using date object how can i add this to my jscode. Please the coding should not be in html script but should be in my jscode. the html code below is for reference only to validate form. Expiry Date (Month) Required field Expiry Date Valid expiry date to ensure the card being used has not expired NOTE: regarding the expiry date, you MUST use the date object to ensure that your date check is dynamic.
using date object how can i add this to my jscode. Please the coding should not be in html script but should be in my jscode. the html code below is for reference only to validate form.
Expiry Date (Month) |
Required field |
Expiry Date |
Valid expiry date to ensure the card being used has not expired |
NOTE: regarding the expiry date, you MUST use the date object to ensure that your date check is dynamic.
<label for="month">Expiry Date</label>
<select id="month" name="month">
<option>- Month -</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select id="year" name="year">
</select>
<p class="cardError error" id="month_error">* You must choose a month</p>
<p class="cardError error" id="expiry_error">* Invalid expiry date</p>
</li>
Step by step
Solved in 3 steps with 2 images