Date and time widgets

Every date, range, duration and recurrence widget installed on this site, built from the real field widget plugins rather than rebuilt by hand -- a date widget is rarely one element, and copying it would be copying the thing under test. Core's date, range, datelist and timestamp widgets; the recurring ones from Date Recur and its four modular rewrites of the same rule; Smart Date, which thinks in durations rather than end times; Duration Field and Interval, which store a length with no start; and the pickers from Flatpickr, Duet, Single Date Time and Datetime Range Popup. The field definitions are made up on the spot, so no fields need to exist and nothing is saved. A widget whose module is not installed is left out rather than shown broken.

A single date and time

The plainest date field there is, and six ways to enter it. Every one of them stores the same string; what changes is how much of the picker is markup the theme owns, and how much is drawn by the browser where nothing can reach it.

datetime_default

Core. A date input beside a time input, both native: the pickers are the ones the operating system draws, so there is nothing in the DOM to theme and no two platforms look alike.

Date

datetime_datelist

Core. The same value as a row of selects -- year, month, day, hour, minute -- which is the fallback for wanting one rendering everywhere. It is the widest of the single-date widgets and the one most likely to break a narrow column.

Date

Smart Date

A range that thinks in durations rather than in end times, on the grounds that an author knows an event runs for an hour more readily than they know it ends at 14:30. The module carries its own field type as well as its own widgets, so it shares nothing with the range widgets above.

smartdate_default

Smart Date. A start, a duration and an end that keep each other in step: changing any two rewrites the third, in the browser. The duration is a select of the usual lengths with a custom option behind it.

When

Start

End

smartdate_inline

The same widget laid out along one line, which is what it has to look like inside a paragraph or a table rather than down a form.

When

Start

to

End

smartdate_only

Start and duration, with no end shown at all.

When

Start

to

End

smartdate_datelist

The select-list rendering, for the same reason the core datelist exists.

When

Start

End

smartdate_timezone

The full widget with a timezone select on the end, for events whose timezone is part of the value rather than a property of the site.

When

Start

to

End

A timestamp

An integer rather than a formatted string, which is what core stores its own dates as.

datetime_timestamp

Core. What the authored-on field of a node form uses: one date and time pair over an integer column.

Date

Leave blank to use the time of form submission.