mdehoog / Semantic-UI-Calendar

Calendar module for Semantic UI
MIT License
805 stars 127 forks source link

set endDate(date) not working? #134

Closed unbreak closed 5 years ago

unbreak commented 5 years ago

I have two calendars, first on onChange callback has:

onChange: function (e, t, a) {         
       $('.ui.calendar.makeCalendar').calendar('set endDate', e);
 }

but still i can change date on the second calendar to larger that endDate.

lubber-de commented 5 years ago

Yes, because set endDate does not block the second calendar to change its end date. It is just to show the range. If you want to prevent someone to change the enddate to a later value, use set maxDate on the second calendar instead. Btw, this calendar module is further maintained at https://github.com/fomantic/Fomantic-UI, so please open issues there instead. Here are the docs https://fomantic-ui.com/modules/calendar.html#behaviors