Reputation: 113
How is it possible to disable (basically i mean just greying out) future dates in Kendo UI Calendar widget? I have only tried to hide future dates but it does not seem to look good and I have tried various way to grey it out but not finding the proper method? Any ideas will be really appreciated.
Upvotes: 2
Views: 2862
Reputation: 21465
The disableDates
options(that you have find out by yourself) function expects to be told whenever it should display the day. So you have to return true if it is a valid date, e.g.:
disableDates: function (date) {
return (date && date.getTime() > (new Date()).getTime());
}
Upvotes: 2