Skip to content

guscost/select-dates-times

Repository files navigation

select-dates-times

Select UI for dates and times, on desktop or mobile, with ShadCN

Demo

https://guscost.github.io/select-dates-times/storybook-static/?path=/story/components-selectdatetimerange--picker

Installation

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} />
    );
}

Building locally and running Storybook

npm i
npm run build
npm run storybook-build
npm run storybook

About

Select dates and times with ShadCN

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published