Smart Datetime Input

Type date/time naturally, like tomorrow at 3pm.

Preview

Please select the full time

Usage

<FormField
control={form.control}
name="what_s_the_best_time_for_you"
render={({ field }) => (
<FormItem>
<FormLabel>What's the best time for you?</FormLabel>
<FormControl>
<SmartDatetimeInput
value={field.value instanceof Date ? field.value : null}
onValueChange={field.onChange}
placeholder="e.g. tomorrow at 3pm"
/>
</FormControl>
<FormDescription>Please select the full time</FormDescription>
<FormMessage />
</FormItem>
)}
/>

Details

This field depends on the smart datetime parser component. Use the reference to bring over the input itself.