@progress/kendo-angular-dateinputs
Version:
Kendo UI for Angular Date Inputs Package - Everything you need to add date selection functionality to apps (DatePicker, TimePicker, DateInput, DateRangePicker, DateTimePicker, Calendar, and MultiViewCalendar).
19 lines (18 loc) • 679 B
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* @hidden
*/
export const disabledDatesValidator = (isDateDisabled) => {
return (control) => {
if (!isDateDisabled || !control.value) {
return null;
}
const error = {
disabledDate: true
};
return isDateDisabled(control.value) ? error : null;
};
};