GuidesComponentsHelpersForm helpers

FormDateField

Formik-connected date, time, or datetime picker field

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

FormDateField opens the platform date/time picker and stores the selected calendar date in a Formik field. Set mode to date, time, or datetime; it defaults to date.

<FormDateField
  name="startDate"
  context={FormikContext}
  label="Start date"
  mode="date"
/>

The current implementation formats the selected value as YYYY-MM-DD. If your backend needs a time zone or an ISO timestamp, convert that value at the form boundary and test the conversion for the user's locale.

Last updated on