LearnNewsExamplesServices
Frontmatter
id4857
titleDate field should show error when invalid date is entered manually
stateClosed
labels
bug
assignees[]
createdAtSep 7, 2023, 11:06 AM
updatedAtSep 7, 2023, 12:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/4857
authorr-l-d
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 7, 2023, 12:54 PM

Date field should show error when invalid date is entered manually

Closed v8.1.0 bug
r-l-d
r-l-d commented on Sep 7, 2023, 11:06 AM

Describe the bug When using a date field and manually entering (typing) an invalid date (e.g., 30 February), there is no error shown.

To Reproduce Steps to reproduce the behavior:

  1. Manually type in an invalid date (30.02.2024) in the date field

Expected behavior The date should be deemed invalid and an error should appear

Screenshots

Screenshot 2023-09-07 at 11 02 03

Desktop (please complete the following information):

  • OS: Mac OS Ventura 13.5.1
  • Browser [e.g. chrome, safari]: Chrome
  • Version [e.g. 22]: 116

Additional context Add any other context about the problem here.

tobiu
tobiu Sep 7, 2023, 12:53 PM

interesting one. i was not aware that input type date even allows wrong inputs.

e.g. if you type a day of 35 and then use the arrow right key, it will adjust the day to the max value of the given month.

you are right though: typing in 30 and then moving the month to february will keep an invalid input. would be fair to say this is a browser bug.

let's fix this in neo anyways.

tobiu referenced in commit 90210ec - "Date field should show error when invalid date is entered manually #4857" on Sep 7, 2023, 12:53 PM
tobiu
tobiu Sep 7, 2023, 12:54 PM
Screenshot 2023-09-07 at 12 50 27
tobiu closed this issue on Sep 7, 2023, 12:54 PM