MCPcopy Create free account
hub / github.com/UI5/webcomponents / isInValidRangeDisplayValue

Method isInValidRangeDisplayValue

packages/main/src/DatePicker.ts:791–803  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

789 }
790
791 isInValidRangeDisplayValue(value: string): boolean {
792 if (value === "" || value === undefined) {
793 return true;
794 }
795
796 const calendarDate = this._getCalendarDateFromStringDisplayValue(value);
797
798 if (!calendarDate || !this._minDate || !this._maxDate) {
799 return false;
800 }
801
802 return calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();
803 }
804
805 /**
806 * The parser understands many formats, but we need one format

Callers 1

Calls 2

valueOfMethod · 0.80

Tested by

no test coverage detected