-
Beta Was this translation helpful? Give feedback.
Answered by
gpbl
Oct 14, 2023
Replies: 1 comment
-
Hi @jullic! You need to set the export const DatePicker: FC<IDatePickerProps> = ({ className, ...props }) => {
const [selectedDay, setSelectedDay] = useState<Date>();
return (
<div className={classNames(styles.root, className)} {...props}>
<DayPicker
mode='single'
locale={ru}
selected={selectedDay}
onSelect={setSelectedDay}
- components={{
- Caption: CaptionDropdowns,
- }}
+ fromYear={2023}
+ toYear={2023}
+ captionLayout="dropdown"
/>
</div>
);
}; E.g.: https://react-day-picker.js.org/basics/navigation#choosing-a-caption-layout |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gpbl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jullic!
You need to set the
fromYear
andtoYear
props if you want thecaptionLayout
prop to work:E.g.: https://react-day-picker.js.org/basics/navigation#choosing-a-caption-layout