Date Picker Range
Date Picker Range
TomBajzek
Posts: 164Questions: 37Answers: 1
The range of selectable dates appears to end with 2028. I have a need to enter dates later than that. Is there a way to extend the range of choosable dates?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Pls take a look:
yearRange is what you are looking for. I guess the default is 10.
In what file is the code in your example? Is it embedded in one of the files in the DataTables library?
Thanks,
Tom
Its an Editor Filed config option:
https://editor.datatables.net/reference/field/datetime
Kevin
Kevin,
Thanks for the pointer. It does what I wanted. I might comment that it extends the dateRange in both directions, which can be useful to know as well.
Thanks!
Glad you got it worked out and thanks for letting us know it goes in both directions. rf1234 is the one who actually provided the answer. I just gave you the link to the docs.
Kevin
Never mind, Kevin! This is team work, isn't it? What I really like about this forum is that it is so civilized and people are usually nice to each other.
@ Tom, glad you got it working and thanks for the hint about both directions. Wasn't aware of that.
Roland
I love this forum for the input that you guys all give. Endless thank yous from me!
Yes, the default for the date range is 10 years so that the select list isn't massive by default. You can also it as Kevin and Roland have described. There is also the
minDate
option that can be used if you don't want it extending into the past.Allan