Support » Plugin: Contact Form 7 Datepicker » Request: min-max dates based on date calculation

  • pjamedia


    This may be a bit of a challenge, but is it possible to have a max-date value based on a date calculation – such as allowing say a ‘Date of Birth’ field to only accept ages older than say 18 years? Then validation would produce a message saying out of allowable date range if that was the case.

    Thanks, Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same here, I would like to know how to throw an error if date selected is under 21. Anybody, somebody, pleeeease 😉

    Pjamedia, not sure if the following will work for you, but if you put this in your backend, date picker will only show you the dates under 21:

    [date* DOB id:DOB class:DOB readonly date-format:mm/dd/yy year-range:1910 max-date:-7670D change-month change-year buttons]

    max-date:-7670D is 21, change it to 6574 for 18 and it will only let user select the dates of 18 and over.

    What I am trying to achieve is give user the whole calendar and then do the calculation of 21years and present them with error.

    Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Request: min-max dates based on date calculation’ is closed to new replies.