Skip to content

Commit

Permalink
fix(ui-date-input): fix messages prop sometimes not populating in Dat…
Browse files Browse the repository at this point in the history
…eInput2
  • Loading branch information
balzss committed Oct 10, 2024
1 parent 0f2ef99 commit 28d2601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui-date-input/src/DateInput2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ const DateInput2 = ({
const [showPopover, setShowPopover] = useState<boolean>(false)

useEffect(() => {
// don't set input messages if there is an error set already
if (!inputMessages) {
// don't set input messages if there is an internal error set already
if (!inputMessages.length && !invalidDateErrorMessage) {
setInputMessages(messages || [])
}
}, [messages])
Expand Down

0 comments on commit 28d2601

Please sign in to comment.