How would I write a program that takes in the values from an html form, calculate the age of the user and determine if they can visit the website if they are above the specified age?

My initial thought process was to get the values from the input form once the button is clicked. Compare that value with the today's date, and if that value is below a specified age, the user will be directed to different website. 

Here is what I have now.

```js
// get values
var userMonth = document.getElementById('userMonth');
var userDay = document.getElementById('userDay');
var userYear = document.getElementById('userYear');
var submitButton = document.getElementById('btnCheckBday');

// when the button is clicked
submitButton.addEventListener("click", calcBirthDate);

// calculating birthday
function calcBirthDate() {
  // get values from user info
  month = userMonth.value;
  day = userDay.value;
  year = userYear.value;

  today = new Date();
  birthday = new Date(year, month, day);
  oldEnough = today - birthday;

  if (oldEnough >= 21) {
    console.log("You are older than 21");
  } else {
    console.log("You are below the age of 21");
  }
}
```

```html
<form>
  <div class="container form-contain">
    <!-- name input -->
    <div class="form-group row">
      <label for="name" class="col-2 col-form-label" id="label-name">Full Name</label>
      <div class="col-10">
        <input type="text" name="name" class="form-control" id="input-name">
      </div>
    </div>

    <div class="from-group row">

      <!-- month -->
      <label for="month" class="col-2 col-form-label" id="label-year">Month:</label>
      <div class="col-2">
        <input type="number" name="month" class="form-control" id="userMonth">
      </div>

      <!-- Day -->
      <label for="day" class="col-2 col-form-label" id="label-year">Day</label>
      <div class="col-2">
        <input type="number" name="day" class="form-control" id="userDay">
      </div>

      <!-- Year -->
      <label for="year" class="col-2 col-form-label" id="label-year">Year</label>
      <div class="col-2">
        <input type="number" name="year" class="form-control" id="userYear">
      </div>

      <div class="form-group row">
        <button class="btn btn-primary" id="btnCheckBday" value="submit">Submit</button>
      </div>

    </div>
  </div>
</form>
```