Date & time properties should be able to edit seconds

Use case or problem

The documentation for the date & time property type defines the time format as 2020-08-21T10:30:00 (i.e. time with seconds). However, the popup editor for the time selector only has minute-level granularity:

If the frontmatter contains a timestamp with seconds, the HTML element is considered to have an invalid value, which manifests as an error in a tooltip:

Proposed solution

Instantiate the <input type="datetime-local"> element for date & time properties with the the step attribute, to allow selecting seconds: <input type="datetime-local" step="1">.

Current workaround (optional)

Edit the frontmatter in source mode.

Related feature requests (optional)

Originally reported this as a bug, because date & time properties with second-level precision cause the HTML element to report a validation error.

2 Likes