You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When valueState property of a DatePicker is set to Error and the date input field is cleared and left, the valueState changes to None.
Affected Component
DatePicker
Expected Behaviour
When valueState property of a DatePicker is set to Error, it should keep this state independent of the internal input value.
The valueState property of a DatePicker should only be changed in context of the use case, similar to other components like Input.
Issue is caused by _updateValueState function, because _checkValueValidity returns true for empty input value:
_checkValueValidity(value: string): boolean{if(value===""){returntrue;}returnthis.isValid(value)&&this.isInValidRange(value);}_updateValueState(){constisValid=this._checkValueValidity(this.value);if(isValid&&this.valueState===ValueState.Error){// If not valid - always set Error regardless of the current value statethis.valueState=ValueState.None;}elseif(!isValid){// However if valid, change only Error (but not the others) to Nonethis.valueState=ValueState.Error;}}
Organization
No response
Declaration
I’m not disclosing any internal or sensitive information.
The text was updated successfully, but these errors were encountered:
Bug Description
When
valueState
property of aDatePicker
is set toError
and the date input field is cleared and left, thevalueState
changes toNone
.Affected Component
DatePicker
Expected Behaviour
When
valueState
property of aDatePicker
is set toError
, it should keep this state independent of the internal input value.The
valueState
property of aDatePicker
should only be changed in context of the use case, similar to other components likeInput
.Isolated Example
No response
Steps to Reproduce
valueState
property toError
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
1.20.0
Browser
Chrome
Operating System
Mac
Additional Context
Issue is caused by
_updateValueState
function, because_checkValueValidity
returnstrue
for empty input value:Organization
No response
Declaration
The text was updated successfully, but these errors were encountered: