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

Method isInValidRange

packages/main/src/DatePicker.ts:749–761  ·  view source on GitHub ↗

* Checks if a date is between the minimum and maximum date. * @public * @param value A value to be checked

(value: string)

Source from the content-addressed store, hash-verified

747 * @param value A value to be checked
748 */
749 isInValidRange(value: string): boolean {
750 if (value === "" || value === undefined) {
751 return true;
752 }
753
754 const calendarDate = this._getCalendarDateFromString(value);
755
756 if (!calendarDate || !this._minDate || !this._maxDate) {
757 return false;
758 }
759
760 return calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();
761 }
762
763 isValidMin(value: string): boolean {
764 if (value === "" || value === undefined) {

Callers 1

_checkValueValidityMethod · 0.95

Calls 2

valueOfMethod · 0.80

Tested by

no test coverage detected