Skip to content

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

@andreas-gebert-dfx

Description

@andreas-gebert-dfx

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions