Is it possible to constrain the date range of the Calendar?
Is it possible to constrain the date range of the Calendar?
I would like to be able to constrain the date range of the Calendar, like it is possible in Scheduler.
I can set date which is the date the calendar starts with, but I would also like to set a minDate and a maxDate that prevent the user from breaking out of this date range, so the various buttons get disabled when the min/max is reached.
Like the agenda view that only shows where is data, I would like the same for the other views.
I can set date which is the date the calendar starts with, but I would also like to set a minDate and a maxDate that prevent the user from breaking out of this date range, so the various buttons get disabled when the min/max is reached.
Like the agenda view that only shows where is data, I would like the same for the other views.
Re: Is it possible to constrain the date range of the Calendar?
Not supported I'm afraid, but you can override these Calendar methods and block the calls as per your needs:
Code: Select all
/**
* Will display next period in calendar.
*/
shiftPrevious : function () {
this.shiftPeriod(-1);
},
/**
* Will display previous period in calendar.
*/
shiftNext : function () {
this.shiftPeriod(1);
},
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog
@bryntum
Facebook
API documentation
@bryntum
API documentation
Re: Is it possible to constrain the date range of the Calendar?
I hoped there was an easier (more direct) way to do this, but will try. Thank you!