Datetime Picker

Choose both date and time together.

Preview

//|:

Add the date of submission with detailly.

Usage

<FormField
control={form.control}
name="submission_date"
render={({ field }) => (
<FormItem className="flex flex-col">
<FormLabel>Submission Date</FormLabel>
<DatetimePicker
value={field.value instanceof Date ? field.value : undefined}
onChange={field.onChange}
format={[
["months", "days", "years"],
["hours", "minutes", "am/pm"],
]}
/>
<FormDescription>Add the date of submission with detailly.</FormDescription>
<FormMessage />
</FormItem>
)}
/>

Details

Sugarforms ships this as an extended input. Use the snippet for form wiring and the reference for the full component.

Component referenceform-builder/components/ui/datetime-picker.tsx