Feature Request: Can you add a time range, e.q. 08:00 - 14:00
I was wondering if you could add time range as a feature?
Btw. the component is very nice and useful! :D
Will there be such a feature?
In this fork https://github.com/onesine/react-tailwindcss-datepicker/commit/199fc839c1d897b3d380b8b70e443399cbb9b33a, it’s possible to pass the startTime and endTime props, and inside the component, we modify the displayFormat if const hasTimeRange = Boolean(startTime && endTime);
Time is in this format: '10:00'
Props:
displayFormat: hasTimeRange
? 'MM/DD/YYYY HH:mm - HH:mm'
: 'MM/DD/YYYY',
startTime: startTime,
endTime: endTime,
The modal window is implemented via Popover.Portal (@radix-ui/react-popover).
A custom wrapper is created around DatePicker to allow passing both the calendar itself and an Addon - in my case, it's two select inputs for time selection.