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>
![Purchase Items
-Card Info
Name on Card
Expiry Date
Card Number
Clear Order
*
Required field
- Month -
2022
* You must choose a month
* Invalid expiry date
*
Required field
* Invalid card number](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa4bd34a9-cad0-4bb6-9739-21da21649a7b%2F6e31a30d-b4d0-46ca-93e5-98ebc492c37c%2Fk0h8zfh_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)