Files
payloadcms/packages
Patrik 394000d07c fix(ui): invalid time value error when document locking with autosave enabled (#14062)
### What?

Fixes "Invalid time value" error in the DocumentLocked modal when
displaying the last edited timestamp.

### Why?

The `formatDate` function was passing a timestamp number directly to
`Intl.DateTimeFormat().format()`, which expects a Date object. When
`updatedAt` is a number (timestamp), this causes an "Invalid time value"
error.

### How?

Wrap the date parameter with `new Date()` before passing it to
`Intl.DateTimeFormat().format()` to properly convert the timestamp to a
Date object.

Fixes #14016
2025-10-03 11:26:48 -07:00
..