longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

Selection range dates stopped by the first disabled date #352

Closed jeffzedev03 closed 5 years ago

jeffzedev03 commented 7 years ago

Hi everyone,

Actually, i use this plugin to my website but i have a very weird bug :

Into my process, i disabled many dates (with the closure 'beforeShowDay'), in my example the Monday are disabled, look it :

https://img15.hostingpics.net/pics/373752dtinitial.jpg

But if i choice my first date for example a Tuesday, i can't selected a end date after the first Monday disabled, then there are some days enabled after... :

https://img15.hostingpics.net/pics/948788dtendate.jpg

Do you have a potentials issues ?

Best Regards, Jeffrey.

davioliveiraweb commented 6 years ago

Any solution to this problem?

holtkamp commented 6 years ago

For a few months I have had the feeling there is a bug related to the time when the DatePicker is used.

@jeffzedev03 can you run your experiment at multiple times of the day and report your timezone? I had some issues that only "appeared" around midnight, days were shifted, ranges would not work, etc. The next morning, everything worked appropriately. So maybe something with timezones / daylight savings time, etc.

maximelafarie commented 6 years ago

@jeffzedev03 I opened a related issue on StackOverflow here: https://stackoverflow.com/questions/47712849/ignore-sundays-from-jquery-date-range-picker/

Here's the working example: https://jsfiddle.net/maximelafarie/dnbd01do/21/

As you can see, the sundays are disabled but you still can select dates after it. Hope it will help you.

holtkamp commented 5 years ago

Seems that @maximelafarie has covered this in detail 🤓 , closing issue