themesberg / flowbite-react

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

Date Picker Auto Hide #1390

Open dlopesa opened 1 month ago

dlopesa commented 1 month ago

Steps to reproduce

<Datepicker
            autoHide={true}
            onSelectedDateChanged={(date) => {
              const localDate = new Date(
                date.getTime() - date.getTimezoneOffset() * 60000
              );
              const dateString = localDate.toISOString().split("T")[0];
              console.log(dateString); // Log the date string
              setDate(dateString);
            }}
            className="dark"
          />

Current behavior

The auto hide does not work, even after selecting a date it does not disappear

Expected behavior

After choosing a day it should disappear

Context

Use a date picker

Video: https://github.com/themesberg/flowbite-react/assets/39463084/b48cd144-9ad7-48c7-a9ac-495ad84225cf