client side date validation in javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tonymotala
    New Member
    • Aug 2015
    • 1

    client side date validation in javascript

    My input text field accepts date in the format yyyymm, i want to validate the date by checking that it is not beyond today's date and it is not more than five years ago
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    the easiest way is to use a datepicker plugin that offers those limits as settings.

    otherwise, create the date objects yourself and compare them.

    date in the format yyyymm, i want to validate the date by checking that it is not beyond today's date
    I assume that to be a little bit tricky if there is no day part in the date.

    Comment

    Working...