Skip to content

Date/Time not showing correct time in edit mode #6260

@MoeHamdanCA

Description

@MoeHamdanCA

Describe the bug
When loading a submitted form in readonly mode the Date/Time picker will show the date/time as per local timezone which is expected behavior. However when editing a submitted form the date/time picker is shown the time as is with conversion (it is coming from API as saved in UTC).

Version/Branch
@formio/js 5.2.3

To Reproduce
Steps to reproduce the behavior:

  1. Create form...
  2. Add datetime component
  3. Submit the form
  4. Reopen the submitted form in edit mode, it will show time as UTC instead of local time

Expected behavior
I expect the datetime component to show the datetime as local time, similar to the way it does when it is showing the submitted form in readonly mode.

Screenshots

Readonly mode
Image

Edit mode
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