Support

Home Forums Event Espresso Premium Set datepicker field to allow years from 2000 and above

Set datepicker field to allow years from 2000 and above

Posted: January 30, 2018 at 8:36 pm

Viewing 1 reply thread


Marshall Laing Music School

January 30, 2018 at 8:36 pm

I want to restrict the datepicker in a field to only allow people to choose a date from the year 2000 (nothing older than that). Is that possible? If so, how would I go about it?


Tony

  • Support Staff

January 31, 2018 at 4:05 am

Hi there,

Yes it is possible, to do this you’ll need to add a snippet of code to your site:

https://gist.github.com/joshfeck/e7a461c24fe75f6decaa

You can add that to a Custom Functions Plugin and change this line:

yearRange: "1960:2010",

To something like:

yearRange: "2000:+10",

Which is from 2000 to +10 years from the current date, so 2000-2028.

Viewing 1 reply thread

The support post ‘Set datepicker field to allow years from 2000 and above’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso