Unify Logo Footer.svg
Unify Applications
Logo
Date & Time Pickers

Date & Time Pickers

Logo

9 mins READ

Date & Time Pickers

Note: Two kinds of date/time components:The Date Picker block is a standalone always-visible calendar used for filtering or display — no label, no validation, no submit flow.The Date, Time, and Date & Time form fields live inside a Form block and participate in validation, required checks, and the form's submit payload.

Date Picker Block (Standalone)

The Date Picker block puts a full calendar on the page, always visible (not a popover). It supports single-month, dual-month, and weekly layouts, header and footer slots, and an add-on system that decorates the calendar with data: event markers, disabled dates, per-day inline text, and min/max selection boundaries.

When to Use

  • Show a calendar as a page element in its own right — a booking view, an availability display, a date filter.

  • Decorate days with data: event markers, prices, blocked-out dates.

  • For collecting a date as part of a form submission, use the Form Date field instead.

Content Properties

PropertyTypeDefaultDescription
valueTypedateOnly | dateRangedateOnlyWhether the user picks one date or a start–end range.
defaultDatedate (bindable)todayThe date pre-selected when the calendar loads. Only in Date Only mode.
defaultStartDate / defaultEndDatedate (bindable)today / today+6The range pre-selected on load. In Date Range mode only.
firstDaySunday … SaturdaySundayWhich weekday starts the calendar week.
slots (header/footer)slot (one block each)emptyLayout areas above and below the calendar grid.

Add-ons

Add-onWhat It Does
EventsMarks days that have events from a bound data source. Style: dot (a dot under the day) or solid (full day cell background). Map Start Date and End Date from the data.
Disabled DatesBlocks specific dates from selection. Bind to an array of ISO strings, timestamps, or date values. Appearance: strikethrough, typography, background, border.
Inline TextPrints short text inside day cells (prices, availability). Bind to an array of {date, text} records. Configure typography.
Min Date / Max DateSelection boundaries — days before min or after max can't be picked. Also limits the year dropdown to the min–max range.

Appearance Properties

PropertyTypeDefaultDescription
periodTypesingleMonth | dualMonth | weeklysingleMonthOne month, two months side by side, or a single week strip.
expandablebooleanAdds a control to expand weekly view to a full month. Only shown when Preview = Weekly.
viewOnlyModebooleanfalseMakes the calendar display-only — clicks select nothing, disabled/min/max styles are not applied.
visibilityconditionShows or hides the block.
stylesstyle setborder, large radiusWidth/height, margin, padding, gap, stroke, radius, color, shadow.

Events

EventTriggerPayload
On ChangeUser picks a date or completes a range. Not fired in view-only mode.value (single date) or {since, until} for range
On Month/Year ChangeVisible month changes via arrows or month/year dropdowns.month (1–12), year

Exposed State

State KeyTypeDescription
{{ id.selectedDate }}dateThe selected date in Date Only mode.
{{ id.selectedRange.since }}dateRange start in Date Range mode.
{{ id.selectedRange.until }}dateRange end in Date Range mode.
{{ id.currentView.month }}numberCurrently displayed month (1-based).
{{ id.currentView.year }}numberCurrently displayed year.

Warning: Min/Max also limits the year dropdown. Setting Min Date or Max Date removes years outside the range from the calendar's year navigation control.

Note: The Date Picker has no callable methods. Change the selection by binding the initial date to a variable and updating the variable.

Date Field (inside a Form)

The Date field is a form field for collecting a calendar date (without time) as part of a form submission. It supports single date or date range, ISO or epoch format, customizable display format, and date selection limits.

Properties

PropertyTypeDefaultDescription
Variantsingle | rangesingleSingle date or start–end range.
Date Formatiso | epochisoHow the value is stored: ISO 8601 string with timezone, or Unix epoch timestamp.
Display Formatformat stringDefaultHow the date appears to the user. Options: Default, MMMM dd yyyy, d MMM yyyy, yyyy-MM-dd, dd MMM, dd-MM-yyyy, or custom pattern. Only available for Single variant on web.
PlaceholderstringText shown while empty. Available when Display Format is not Default.
Default Valuestring/numberStarting date in the selected format. Dynamic bindings update the field.
Initial Start / End DatestringPre-selected range values. Range variant only.

Date Selection Limits Add-on

OptionDescription
Only Future DatesRestricts picking to today and future. Offers "Include Today" toggle.
Only Past DatesRestricts picking to today and past. Offers "Include Today" toggle.
Custom Date RangeSet explicit earliest and latest allowed dates.

Warning: Date Selection Limits enforce at submit time too. Not just as a picker restriction — selecting an out-of-range date (e.g. via a bound default) also blocks form submission with a validation error.

Time Field (inside a Form)

The Time field collects a time of day — no date attached. Use it when the calendar day is fixed or irrelevant and only the clock time matters.

Properties

PropertyTypeDefaultDescription
Default ValuestringStarting time as 12-hour (09:00 AM) or 24-hour (21:00) notation.
Step Size (minutes)numberInterval between times offered by the picker. Placeholder suggests 15; no configured default means the picker uses its built-in interval.
Is OptionalbooleantrueTurn off to require a time before submit.
Disabled / Read OnlyconditionDisable or lock the field based on a condition.
VisibilityconditionShow or hide the field.
Widthpercentage100%Field width as a percentage of the form row.

Note: Stored value is always 24-hour with seconds. The submitted value is always like 14:30:00 regardless of whether the picker shows 12-hour or 24-hour time. The value carries no date and no timezone.

Date & Time Field (inside a Form)

The Date & Time field captures an exact moment — a calendar date combined with a time of day. Use it for appointments, event start times, and deadlines where the time of day matters. Unlike the Date field, it has no range variant.

Properties

PropertyTypeDefaultDescription
Default Valuestring/numberStarting datetime as ISO 8601 string (2024-01-01T00:00:00Z).
Display Formatformat stringDefaultHow the datetime appears. Presets include: 04/12/2024 16:30, Apr 12, 2024 4:30PM, 12 Apr 2024, 16:30:00, or a custom pattern.
PlaceholderstringShown while empty. Available when Display Format is not Default.
Date Selection Limitsadd-onOnly Future Dates, Only Past Dates, or Custom Date Range. Same as the Date field.
Is OptionalbooleantrueTurn off to require a value before submit.

Choosing the Right Component

ScenarioUse
Booking calendar / availability display on a pageDate Picker block
Calendar that shows events or prices per dayDate Picker block with Events / Inline Text add-ons
Collect a calendar date in a form (birthday, due date)Date field inside Form
Collect a date range in a form (booking window)Date field with Variant = Range inside Form
Collect a time of day in a form (opening hours)Time field inside Form
Collect an exact moment in a form (appointment slot)Date & Time field inside Form

Frequently Asked Questions

What is the difference between the Date Picker block and the Date form field?

The standalone Date Picker block renders an always-visible calendar on the page and exposes its value immediately via {{ id.value }}. Use it for date-filtering widgets or dashboard controls. The Date form field is embedded inside a Form block, stores to {{ form.data }}, and participates in form submission, validation, and reset flows. Choose the block for real-time UI interactions; use the form field when date input is part of a data-entry form.

How is a time value stored — in 12-hour or 24-hour format?

Time values are always stored and returned as a 24-hour HH:mm:ss string regardless of how the picker displays the time to the user. When you reference {{ form.data.myTimeField }}, you'll always get a string like "14:30:00". The display format (12 vs 24-hour with AM/PM) can be configured separately for the visible picker.

Can I set minimum and maximum selectable dates on a Date Picker block?

Yes. Open the Add-ons panel for the Date Picker block and add the Date Selection Limits add-on. Set a Min Date and/or Max Date — these can be static values or dynamic expressions referencing other page state. Dates outside the range are rendered as disabled in the calendar and cannot be selected.

Why does my Date & Time field not support a range selection?

The Date & Time form field only supports single date-and-time selection, not ranges. If you need a date range with times, you would need two separate Date & Time fields (e.g., "Start date/time" and "End date/time"). Range selection is available on the plain Date form field and the standalone Date Picker block.

How do I control the step interval for time selection (e.g., 15-minute increments)?

The Time form field has a Time Step Size property (in minutes). Set it to 15 to show options at :00, :15, :30, :45. This affects the picker's option list, not free-form typing — users can still manually type any time value. The Date & Time field does not have a step size option.

Step-by-Step Examples

Availability Calendar with Blocked-Out Dates

  1. Drop a Date Picker block on the page.

  2. Set Value Type = Date Only.

  3. Enable the Disabled Dates add-on and bind its Data Source to your bookings query (an array of ISO dates).

  4. Enable Min Date = today so past days can't be picked.

  5. On On Change, run your booking flow with {{ datePicker1.selectedDate }}.

Date Range Picker in a Form (Report Period)

  1. Add a Date field inside your Form block.

  2. In Date options, set Variant to Range.

  3. Set Initial Start Date to the beginning of the current month and Initial End Date to today.

  4. Make the field required: turn Is Optional off.

  5. On form submit, access the values with {{ form1.data.reportPeriod.start }} and {{ form1.data.reportPeriod.end }}.

Appointment Slot Form

  1. Add a Date & Time field inside your Form block.

  2. Set Display Format to MMM dd, yyyy h:mma.

  3. Set Placeholder to "Pick an appointment time".

  4. Open Add-ons → Date Selection Limits and choose Only Future Dates.

  5. Make required: turn Is Optional off.

Delivery Time Picker

  1. Add a Time field inside your Form block.

  2. Set Label to "Preferred delivery time".

  3. In Time options, set Step size (in minutes) to 30 for half-hour slots.

  4. Turn Is Optional off to make it required.

  5. The submitted value will be in 24-hour format with seconds, e.g. 14:30:00.