UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

18 lines 702 B
import { isDateExceedingMax, isDateLessThanMin } from '../calendar/helpers.js'; import { maxDateValidator, minDateValidator, requiredValidator, } from '../common/validators.js'; export const dateTimeInputValidators = [ requiredValidator, { ...minDateValidator, isValid: (host) => host.value && host.min ? !isDateLessThanMin(host.value, host.min, host.hasTimeParts(), host.hasDateParts()) : true, }, { ...maxDateValidator, isValid: (host) => host.value && host.max ? !isDateExceedingMax(host.value, host.max, host.hasTimeParts(), host.hasDateParts()) : true, }, ]; //# sourceMappingURL=validators.js.map