I want to disable Past dates in Kendo Date Picker. How can I do?
<kendo-datepicker [(value)]="oneTime.startDate" [disabled]="disableDates()"></kendo-datepicker>
disableDates() {
//return (this.currentDate.getTime() (new Date()).getTime());
}
<kendo-datepicker [(value)]="startDate" [disabledDates]="disabledDates"></kendo-datepicker>
public disabledDates = (date: Date): boolean => {
const yesterday = (d => new Date(d.setDate(d.getDate() - 1)))(new Date);
return (date.getTime() < yesterday.getTime());
};