Contact Form 7 Datepicker
Request: min-max dates based on date calculation (3 posts)

  1. pjamedia
    Posted 3 years ago #

    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


  2. zeevee1
    Posted 2 years ago #

    Same here, I would like to know how to throw an error if date selected is under 21. Anybody, somebody, pleeeease ;-)

  3. zeevee1
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7 Datepicker
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic