yucky-goldY
Refineโ€ข4y agoโ€ข
15 replies
yucky-gold

datepicker mantine

How would I use the 'getInputProps' method of the 'useForm' hook to register a datePicker of @mantine/dates?

Currently able to render a date via (although to invoke the calendar, have to move mouse pointer all the way to the end of input field),
import { TextField } from "@pankod/refine-mantine";
...
<TextInput
    mt={8}
    label="Date Rx Rc'd"
    placeholder="Date Rx Rc'd"
    type='date'
    {...getInputProps("date_rx_received")}
>


I've seen examples of how to render that in MUI and Ant, but don't know how to implement for mantine,
import { DatePicker } from "@mantine/dates"
<DatePicker
    style={{ marginTop: 20 }}
    label="Date Rx Rc'd"
    {...getInputProps("date_rx_received")}
/>
Was this page helpful?