themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.82k stars 406 forks source link

Datepicker onChange not working #1209

Closed yzidanNqood closed 7 months ago

yzidanNqood commented 7 months ago

After following this docs:https://www.flowbite-react.com/docs/components/datepicker

the onChange is not working at all.

import { Datepicker } from 'flowbite-react';

<Datepicker
        onChange={(val) => {
          console.log(val);
        }}
/>
tulup-conner commented 7 months ago

Hey there! You need to use <Datepicker onSelectedDateChange> instead. That's not your fault - it isn't documented there right now, and we have already recognized that this is a common point of confusion for users. It will more than likely be possible to use onChange soon.