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

[BUG] - Unable to dismiss DatePicker after date selected by Preset #3457

Open
MinChanSike opened this issue Jul 12, 2024 · 9 comments · May be fixed by #3476
Open

[BUG] - Unable to dismiss DatePicker after date selected by Preset #3457

MinChanSike opened this issue Jul 12, 2024 · 9 comments · May be fixed by #3476
Assignees
Labels
✨ Type: Enhancement New enhancement on existing codebase

Comments

@MinChanSike
Copy link

MinChanSike commented Jul 12, 2024

NextUI Version

2.4.2

Describe the bug

How to dismiss DatePicker after update the value from Preset?
Click selector button after update the value, but does not work.
popoverProps -> onOpenChange also does not trigger when DatePicker is show.

Your Example Website or App

https://codesandbox.io/p/devbox/vigilant-tharp-wm48j3?file=%2FApp.tsx%3A71%2C15

Steps to Reproduce the Bug or Issue

  1. Click selector button to open datePicker
  2. Click some date from calender
  3. Datepicker is close after select date from calender
  4. Click selector button to open datePicker
  5. Click Today preset button to select the data,
  6. Calender does not close after select

Expected behavior

I expected to dismiss DatePicker by programmatically.

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

Copy link

linear bot commented Jul 12, 2024

@wingkwong wingkwong added the ✨ Type: Enhancement New enhancement on existing codebase label Jul 12, 2024
@kajaveaniruddha
Copy link

@wingkwong i would like to take up the issue.

@wingkwong
Copy link
Member

@kajaveaniruddha Thanks. Please feel free to ping us in discord if you have any question.

@kajaveaniruddha
Copy link

kajaveaniruddha commented Jul 14, 2024

@wingkwong I have been on the project for for past few days, I have identified the parts of files I have to work on (date-picker.stories.tsx, date-picker.tsx, use-date-picker.ts). I am unable to target the CalendarTopContent elements (those are the buttons like today, next week etc). Can you help with something so that i can proceed ahead ?

@ShrinidhiUpadhyaya
Copy link
Contributor

Hi @wingkwong , what is the expected behavior in this? Is it to automatically close the DatePicker on selection of Presets or to implement/connect onOpenChange for DatePicker ?

@wingkwong
Copy link
Member

wingkwong commented Jul 15, 2024

@ShrinidhiUpadhyaya from my understanding, users want to dismiss the date picker after clicking preset buttons, just like when you select a date. however, i think it's better to cover both case.

ShrinidhiUpadhyaya pushed a commit to ShrinidhiUpadhyaya/nextui that referenced this issue Jul 15, 2024
@wingkwong
Copy link
Member

@ShrinidhiUpadhyaya this issue has been assigned to someone else. Next time please communicate with the assignee before your implementation.

@kajaveaniruddha
Copy link

@wingkwong can you share the discord community link ?

@wingkwong
Copy link
Member

@kajaveaniruddha https://discord.gg/9b6yyZKmH4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Type: Enhancement New enhancement on existing codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants