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

Unable to edit date from input #46

Open
L2Develop96 opened this issue Apr 14, 2023 · 5 comments
Open

Unable to edit date from input #46

L2Develop96 opened this issue Apr 14, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@L2Develop96
Copy link

I can't find a way to edit the date directly from the input field without having to open the date picker.

@aboveyunhai
Copy link
Owner

aboveyunhai commented Apr 20, 2023

I think a lot of troubles is actually coming from the <input /> trigger and <popover/> wrapper on top of the calendar panel, as well as the accessibility issue, data binding,
let me decouple the entire panel in the next version (this weekend hopefully), and come up an example how to update the data so you can use whatever trigger you want other than input, render calendar anyway. So I can put the focus on the calendar panel itself.

In fact, I always recommend ppl copy paste the src code into their project and modify whatever they want, because this lib is pretty lightweight.
I believe chakra team is building the datepicker, just not sure when it will be done, after that, I will probably make the recommendation to the official one.

@aboveyunhai aboveyunhai added the enhancement New feature or request label Apr 20, 2023
@JacobwBruce
Copy link

Hi!
Is there any update on this? I'm still having this issue on the latest version (0.2.9)

@aboveyunhai
Copy link
Owner

aboveyunhai commented Aug 12, 2023

Hi! Is there any update on this? I'm still having this issue on the latest version (0.2.9)

Unfortunately no, since the default input is a popover trigger now, make it editable will cause confusing behavior, we don't know whether you want to open the panel or edit the input when you click the input. At least it's not possible for the current input wrapper. I think you might want to create your own input wrapper to mimic the correct HTML datepicker behavior. The latest version separates the calendar from input. check the calendar example: https://aboveyunhai.github.io/chakra-dayzed-datepicker/

@L2Develop96
Copy link
Author

Hi! Is there any update on this? I'm still having this issue on the latest version (0.2.9)

Unfortunately no, since the default input is a popover trigger now, make it editable will cause confusing behavior, we don't know whether you want to open the panel or edit the input when you click the input. At least it's not possible for the current input wrapper. I think you might want to create your own input wrapper to mimic the correct HTML datepicker behavior. The latest version separates the calendar from input. check the calendar example: https://aboveyunhai.github.io/chakra-dayzed-datepicker/

Why not just make a button next to the input where you can open/close it from there? And make the input editable and doesn’t trigger the calendar when clicked ? Because in the example you shared, once I click on the input it still opens the calendar.

@aboveyunhai
Copy link
Owner

aboveyunhai commented Aug 12, 2023

@L2Develop96 The reason is pretty simple, I didn't think that much when I create the lib, nor caring about the default html datepicker behavior (feel free to call me stupid)😅. it was just a copy&paste demo I used at the beginning. So the easiest way to just create a new datepicker component or variant prop to the one you refer and without breaking anything, and then release it in the next version.

@aboveyunhai aboveyunhai linked a pull request Jan 22, 2024 that will close this issue
@aboveyunhai aboveyunhai mentioned this issue Jan 22, 2024
@aboveyunhai aboveyunhai removed a link to a pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants