[bug]Calendar startCalendar and endCalendar ignore the disabled dates #667
-
Bug ReportI have two calendars linked with startCalendar and endCalendar if there are some disabled dates between the first and the second selected dates the calendars work like if disabled dates aren't disabled. Sorry for my bad english and this is my first time on github I hope I have presented the problem at its best Steps to reproduce
Expected resultendCalendar should block the selection on any dates after the disabled day Actual resultstartCalendar and endCalendar ignore the disabled dates Live examplehttps://jsfiddle.net/jym10Lud/ Version2.7 |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
@Wolclaws |
Beta Was this translation helpful? Give feedback.
-
Added an example https://jsfiddle.net/jym10Lud/ |
Beta Was this translation helpful? Give feedback.
-
@Wolclaws Let me confirm that your want to have a new setting to disable "days after the specified date" ? |
Beta Was this translation helpful? Give feedback.
-
@Wolclaws To gain your desired behavior(and described by @exoego ), you can achieve this by using |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay in replying. @exoego Not exactly, I think it is more useful a new setting (maybe boolean) to disable "days after a disabled day if this is included in the selected period between two or more calendars linked by startCalendar and endCalendar". @lubber-de Yours is a good solution, but there is some problem with the "set maxDate" behavior. The console returns this error to me: Can you help me? Here is my code that you can also use as a basis for the setting I was talking about with @exoego |
Beta Was this translation helpful? Give feedback.
-
@Wolclaws You have to provide the maxdate as a separate argument $('.end').calendar('set maxDate',maxdate); |
Beta Was this translation helpful? Give feedback.
-
@lubber-de Perfect thanks! I had taken an oversight ^^" |
Beta Was this translation helpful? Give feedback.
-
Closing since desired behavior is doable using existing features. |
Beta Was this translation helpful? Give feedback.
@Wolclaws To gain your desired behavior(and described by @exoego ), you can achieve this by using
maxDate
. Set this to the lowest value of disabledDatesSee https://jsfiddle.net/L5w7vtcj/1/