Skip to main content

Date and time input elements (web)

Date and time inputs let users pick or type a date, a time, or both. Learn how the date/time picker and date-formatted input work, and how Bubble saves the dates users choose.

Written by Sofia Maconi

Date and time elements allow your users to specify a date, a time, or both in different ways. Whether you want to save a user's birthday, filter search results, or accept bookings in a specific time zone, Bubble offers multiple tools to set it up in a user-friendly way.

Designing a UX that handles dates and time opens up a wide range of different scenarios. While Bubble's built-in tools provide a variety of features, there are also a lot of plugins that offer even more customization.

Check out the Bubble Marketplace to learn more.

How Bubble handles timestamps and time zones

Working with dates and times, especially across time zones, can be complex. Bubble automatically handles time zone calculations, including adjustments for Daylight Saving Time (DST).

To learn more about how this works and how to override time zones when needed, check out the article below:

Date/time picker

How to use the date/time picker input element

The date/time picker lets your users pick a date and a time from a visual calendar. It can also be set up to only pick a date, in which case the field to the right in the animation below will be hidden.

Date/time picker where the user opens a calendar, picks a new date, and then changes the time.

The date/time picker gives your users a visual interface to pick a date, or a date and a time.

If you set up the element to only ask for a date, the date will be saved at 12 AM (00:00) on the chosen date in the current user's time zone (see Key terms). If you have selected a different time zone in the element property editor (see Key terms), the date will be saved at 12 AM (00:00) in that time zone.

You can set a minimum and maximum date as well as a minimum and maximum time of day, and you can set the interval for the time picker (which is 30 minutes by default).

Field type returned: date

Video lessons

How to use the date/time picker input element

Input

The Input element is mainly used for text input, but can be set up to expect a date instead. In this case, the user won't see a calendar or time picker, but will instead be able to type the date directly. Note that the input element supports dates but not time. It can be set up to format the date in:

  • US format (mm/dd/yyyy)

  • European format (dd/mm/yyyy)

Text input containing the date 01/31/1970.

An input with the Date format lets the user type a date directly.

Field type returned: date

Key terms

Current user's time zone: All computers have a time zone setting, and this is passed on to the web browser. Bubble in turn uses this information to determine what time zone the user is in, to correctly show the current date and time.

Bubble uses this time zone by default, but it can be overridden in many elements and operators.

Element property editor: The element property editor is the floating window that lets you edit the properties of an element.

You display the element property editor either by double-clicking the element in the Design tab or by clicking it once in the element tree.

Did this answer your question?