formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

DateTime-Field: strange behavior when changing a date with the keyboard and pressing enter

Open andreas-gebert-dfx opened this issue 3 months ago • 1 comments

Describe the bug I edit the date using the keyboard. For example, if I manually adjust the month and press enter, the year changes from 2025 to 0251.

My Config: { "label": "Date / Time", "format": "dd-MM-yyyy hh:mm a", "tableView": false, "datePicker": { "disableWeekends": false, "disableWeekdays": false }, "enableMinDateInput": false, "enableMaxDateInput": false, "validateWhenHidden": false, "key": "dateTime", "type": "datetime", "input": true, "widget": { "type": "calendar", "displayInTimezone": "viewer", "locale": "en", "useLocaleSettings": false, "allowInput": true, "mode": "single", "enableTime": true, "noCalendar": false, "format": "dd-MM-yyyy hh:mm a", "hourIncrement": 1, "minuteIncrement": 1, "time_24hr": false, "minDate": null, "disableWeekends": false, "disableWeekdays": false, "maxDate": null } },

Version/Branch What release version or branch are you experiencing the behavior 4.14.1 - 5.2.2

To Reproduce Steps to reproduce the behavior:

  1. Create form
  2. Add component DateTime with Format dd-MM-yyyy hh:mm a
  3. Select a Date with the Calender
  4. Use the Keyboard to change the Value and press enter
  5. Error: Year gets changed. For example 2025 to 0251

Expected behavior If the date is valid, it should be displayed correctly in the field and in submission.

Screenshots Inital Value

Image

Value after change with enter

Image

andreas-gebert-dfx avatar Sep 24 '25 09:09 andreas-gebert-dfx

Hi, @andreas-gebert-dfx ! Thank you for reporting this. We have logged this known issue for the backlog. We are always willing to review any contributions to resolve this issue from the open source community.

For internal reference: FIO-8375

Victoriya25 avatar Oct 16 '25 08:10 Victoriya25