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

Problem with date range that includes disabled weekends. #322

Open chiradip opened 7 years ago

chiradip commented 7 years ago

If I disable weekends - that means not allowing users to select weekends as start and end date I cant select something that includes weekends in the range - start date and end dates are not weekends.

Configuration uses is this - beforeShowDay: function(t) { var valid = !(t.getDay() == 0 || t.getDay() == 6); //disable saturday and sunday var _class = ''; var _tooltip = valid ? '' : 'We are closed on weekends'; return [valid,_class,_tooltip]; },