Modules / Forms

Form: time picker and date limits

Add a time-only picker, an earliest and latest date, disabled weekdays and a minute step to the date field of the Form element. The picker enforces the limits, and Kiln checks them again when the visitor submits the form.

#12 of 39 modules by votes

  • On by default
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3

Tile 12 of 39, ranked by votes · Recording in progress

Where to find it in the builder

Form element, Content tab, inside each field of the Fields list, after Max. time. The controls show when the field is a date picker. Earliest date, Latest date and Disabled weekdays are hidden while Time only (no calendar) is ticked.

How to use it

  1. In the Form element, open a field whose type is the date picker.
  2. For a time field, tick Time only, no calendar (Kiln). The picker shows a clock and no calendar.
  3. To limit the dates, fill in Earliest date and Latest date. Write today, a number of days from today such as +2 or +90, or a date such as 2026-12-24. A negative number such as -3 counts days before today.
  4. To block days of the week, choose them in Disabled weekdays.
  5. To limit the minutes, set Minute step, from 1 to 60. A step of 15 allows :00, :15, :30 and :45.
  6. Optional: write your own text in Date not allowed message. The default is "Please choose an available date."

Kiln ignores anything else typed in the date fields.

How it works with your own settings

Bricks' Min. time and Max. time still apply, including in a time-only field. Once you set any Kiln option on a field, the server also checks that field's Min. time and Max. time.

Disabled weekdays are added to the rules the picker already has. A holiday list you set through Bricks' date picker filter keeps working.

Relative dates count from today in the site's timezone, set in WordPress under Settings > General. The picker works them out in the visitor's browser, so a cached page never shows yesterday's limit.

In a time-only field the picker follows the site's time format: 24-hour when the format uses H or G, otherwise 12-hour with AM and PM.

Limits

  • Date limits and disabled weekdays apply in the picker on the front end. The script that applies them does not load in the builder.
  • The server checks the submitted text against the limits, the weekdays, the minute step and the time range. An empty value is skipped, because Required is Bricks' job.
  • When the picker is translated and the date format prints month or weekday names, the server cannot read the value back. The same holds for a date format with a token the server cannot read. In both cases the picker alone enforces the limits.
  • The minute step counts within each hour. It is checked on the server only for time-only fields and for date pickers with time enabled.

Settings

None. Turn the module on in Bricks > Kiln (it is on by default).

Requirements

Bricks 2.4 or newer.