()
| 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; |
no test coverage detected