qodesmith / datepicker

Get a date with JavaScript! A datepicker with no dependencies.
344 stars 101 forks source link

date-picker range #119

Closed bsastregx closed 3 years ago

bsastregx commented 3 years ago

Hi! First of all thanks so much for such an amazing plugin! I am trying to use two date-pickers with the same id to use a daterange. I am giving, by default, the following min and max dates: minDate : 1000, 1, 1; maxDate : 3000, 1, 1;

When I use only one date-picker, this works fine. However, when using two date-pickers with the same id, for using the range, the minDate for the first picker is TODAY, and for the second date picker, the maxDate is TODAY.

I have recorded a little video to make it more clear: https://www.awesomescreenshot.com/video/5119600?key=b076cb1f1180c4fbf2f799d951e103c0

What I expect the datepicker to do: For both the two pickers, the minDate should be 1000,1 1; For both the two pickers, the maxDate should be 3000,1 1;