Appearance

Multiple Months

Display more than 2 months side by side. Defaults to 2 for range pickers.

import { useState } from "react";
import { DateRangePicker } from "react-date-range-picker-tailwind4";
function MultiMonth() {
const [value, setValue] = useState<{ start: Date | null; end: Date | null }>({
start: null,
end: null,
});
return <DateRangePicker value={value} onChange={setValue} numberOfMonths={3} />;
}

Custom Locale

Use createLocale from the headless package to customize month/day names and UI strings.

import { useState } from "react";
import { DateRangePicker } from "react-date-range-picker-tailwind4";
import { createLocale } from "react-date-range-picker-headless";
const koLocale = createLocale("ko-KR", {
confirm: "확인",
cancel: "취소",
clear: "초기화",
today: "오늘",
rangePlaceholder: "날짜 범위 선택",
rangeSeparator: " ~ ",
});
function CustomLocale() {
const [value, setValue] = useState<{ start: Date | null; end: Date | null }>({
start: null,
end: null,
});
return <DateRangePicker value={value} onChange={setValue} locale={koLocale} />;
}

Caption Dropdown

Switch from button navigation to dropdown selectors for month and year. Useful for picking dates far from the current month.

import { useState } from "react";
import { DateRangePicker } from "react-date-range-picker-tailwind4";
function CaptionDropdown() {
const [value, setValue] = useState<{ start: Date | null; end: Date | null }>({
start: null,
end: null,
});
return (
<DateRangePicker
value={value}
onChange={setValue}
captionLayout="dropdown"
fromYear={2020}
toYear={2030}
/>
);
}