Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Picker Auto Hide #1390

Open
2 tasks done
dlopesa opened this issue May 8, 2024 · 0 comments
Open
2 tasks done

Date Picker Auto Hide #1390

dlopesa opened this issue May 8, 2024 · 0 comments

Comments

@dlopesa
Copy link

dlopesa commented May 8, 2024

  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant