Skip to content

Date / Time pickers

Date pickers and Time pickers provide a simple way to select a single value from a pre-determined set.

  • On mobile, pickers are best suited for display in confirmation dialog.
  • For inline display, such as on a form, consider using compact controls such as segmented dropdown buttons.

React components

mm/dd/yyyy

Native pickers

⚠️ Native input controls support by browsers isn't perfect.

Date picker

A native datepicker example with type="date".

<form noValidate>
  <TextField
    id="date"
    label="Birthday"
    type="date"
    defaultValue="2017-05-24"
    style={{ width: 220 }}
    InputLabelProps={{
      shrink: true,
    }}
  />
</form>

Date & Time picker

A native date & time picker example with type="datetime-local".

<form noValidate>
  <TextField
    id="datetime-local"
    label="Next appointment"
    type="datetime-local"
    defaultValue="2017-05-24T10:30"
    style={{ width: 250 }}
    InputLabelProps={{
      shrink: true,
    }}
  />
</form>

Time picker

A native time picker example with type="time".

<form noValidate>
  <TextField
    id="time"
    label="Alarm clock"
    type="time"
    defaultValue="07:30"
    InputLabelProps={{
      shrink: true,
    }}
    inputProps={{
      step: 300, // 5 min
    }}
    style={{ width: 150 }}
  />
</form>