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
feat: add date-time-picker #1353
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Good progress @YushiroDodo63 Ideally, I would recommend we add this feature to the existing date picker machine instead of creating a new one, so we don’t duplicate code. |
@segunadebayo Initially, I was considering integrating this functionality into the existing DatePicker component. If integrating this functionality is a priority, what are the specific reasons and benefits of this integrated approach? I am a big fan of this project and fully support its goals. I look forward to your advice on how to proceed. |
I appreciate your comment and glad you're excited about Zag. Here's how I would approach it @YushiroDodo63 Rendering the time Start by rendering the time component of the specified
Editing the time To edit the time segment of the date, we need to render a list of hours/minutes/period within the picker. To solve this, you'll need to provide:
Finally, you need to provide prop getters for the time segments. In this prop getters, you'll attach an
I hope this is helpful to you. |
Thanks for attempting this @YushiroDodo63. Closing for now. Kindly re-open when you have time. |
Closes #1340
📝 Description
A new DateTimePicker component, equivalent to
<input type="datetime-local">
, has been implemented to allow users to select both date and time in one unified interface.This component acts as an enhancement to our existing DatePicker, providing support for datetime-local input types.
🚀 New behavior
2020-11-22 12:22
2020-11-22T12:22:00
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Before publishing this PR, the following tasks need to be completed:
I have developed and implemented the input/output formats and functions for handling time based on my understanding.
However, I welcome feedback on the naming conventions, processing content, and formats used.
If there are any suggestions for improvements or corrections, please do not hesitate to review and comment.