pickadate.js icon indicating copy to clipboard operation
pickadate.js copied to clipboard

There is no option to decide how to load (whether load any years after current year) for the option selectYears: num_of_years

Open Shimul22 opened this issue 5 years ago • 2 comments

It is working OK rather for the case Date of Birth selection. If I use selectYears: 50, it loads 25 years before the current year and 25 years after the current year. But there is no need to load any years after the current year.

I have slightly tweak your code by passing another option (dob: true/false) and adjust the JavaScript code to fulfill my requirements.

I hope you will also provide an option to decide the user whether they want to load any years after the current year or not!!

I have attached what I changed in your code.

carbon (3)

Shimul22 avatar Apr 28 '19 13:04 Shimul22

I have attached what I changed in your code.

Hi, not sure where you have changed it in the source files. Can you provide a patch file or PR which shows the actual changes?

DanielRuf avatar Apr 28 '19 16:04 DanielRuf

There is. You can just use max: true and it will work for you. Here's the example: https://jsfiddle.net/xs4z1dot/

bsgies avatar May 03 '19 12:05 bsgies