Select UI for dates and times, on desktop or mobile, with ShadCN
npm i -S select-dates-times
import { useState } from "react";
import { SelectDateTimeRange } from "select-dates-times";
// Then render...
export default const MyDateTimeRangePicker = () => {
const [range, setRange] = useState({
from: new Date() - 86400000,
to: new Date(),
});
return (
<SelectDateTimeRange initialRange={range} onSelect={setRange} />
);
}
npm i
npm run build
npm run storybook-build
npm run storybook