React TailwindCSS
Date & Time Picker
A powerful, customizable date and time range picker component for React, styled with TailwindCSS.
npm install react-tailwindcss-datetimepickerQuick Example
From Date
:
Mo
Tu
We
Th
Fr
Sa
Su
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
From Date
To Date
:
Mo
Tu
We
Th
Fr
Sa
Su
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
To Date
import ReactDateTimePicker from 'react-tailwindcss-datetimepicker';
import 'react-tailwindcss-datetimepicker/dist/style.css';
const ranges = {
Today: [startOfDay(new Date()), endOfDay(new Date())],
'Last 7 Days': [subDays(new Date(), 7), new Date()],
};
function App() {
const [start, setStart] = useState(new Date());
const [end, setEnd] = useState(new Date());
return (
<ReactDateTimePicker
ranges={ranges}
start={start}
end={end}
applyCallback={(s, e) => { setStart(s); setEnd(e); }}
>
<button>Pick a date range</button>
</ReactDateTimePicker>
);
}Features
Date Range Selection
Select start and end dates with an intuitive dual-calendar interface.
Time Picker
Built-in time selection with 12-hour and 24-hour clock support.
Preset Shortcuts
Define custom preset ranges like "Today", "Last 7 Days", or any custom period.
Dark Mode
Built-in dark mode support via Tailwind CSS class-based toggling.
Mobile Responsive
Automatically adapts to mobile screens with stacked calendar layout.
TypeScript
Fully typed with TypeScript. Includes all type definitions out of the box.