Skip Navigation

[Resolved] Need larger year range in DatePicker

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to change the range of years that can be selected in DatePicker for a date custom field?

Solution:
You must add some JS to update the datepicker settings once it has been initialised already.

A solution is shown in the linked thread here: https://toolset.com/forums/topic/year-range-in-types-jquery-ui-datepicker/#post-160412

Relevant Documentation:
http://api.jqueryui.com/datepicker/#option-yearRange

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Michelle Dodd 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#956693

I found this thread here: https://toolset.com/forums/topic/year-range-in-types-jquery-ui-datepicker/

And it looks like there is a solution but the link is not accessible. What is the solution for having the datepicker filter dropdown go back more years?

Thanks,
Michelle

#957137

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Michelle

That thread you link to (specifically https://toolset.com/forums/topic/year-range-in-types-jquery-ui-datepicker/#post-160412) shows how to update the datepicker settings.

The link that is missing is to http://api.jqueryui.com/datepicker/#option-yearRange which documents the various ways you can set the year range (with specific years, or relative to the current year).

#957293

Thank you, I'll give that a try.