amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.02k forks source link

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

Open Shimul22 opened 5 years ago

Shimul22 commented 5 years ago

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)

DanielRuf commented 5 years ago

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?

bsgies commented 5 years ago

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