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

Method _updateValueState

packages/main/src/TimePicker.ts:677–685  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

675 }
676
677 _updateValueState() {
678 // During live typing, validate against displayFormat (what user types), otherwise validate against valueFormat (stored value)
679 const isValid = this.isValidValue(this.value);
680 if (!isValid) { // If not valid - always set Error regardless of the current value state
681 this.valueState = ValueState.Negative;
682 } else if (isValid && this.valueState === ValueState.Negative) { // However if valid, change only Error (but not the others) to None
683 this.valueState = ValueState.None;
684 }
685 }
686
687 _handleInputChange(e: CustomEvent) {
688 const target = e.target as DateTimeInput;

Callers 1

Calls 1

isValidValueMethod · 0.95

Tested by

no test coverage detected