-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add date picker component (full accessibility support) #2994
base: master
Are you sure you want to change the base?
Conversation
I think Daisy should remain a CSS library. Why not just take a headless component framework like Bits UI (https://www.bits-ui.com/docs/introduction) and design it with Daisy? |
It still a CSS library, this PR does not includes anything else than CSS |
As much as I would love to include a datepicker UI in daisyUI and there are indeed a lot of requests for that, This PR adds the visual (thanks @sovetski) but if we're expecting devs to manually implement a fully working JS datepicker logic for their apps, that's not realistic. I think it would be more practical if we just use existing JS datepicker packages and only apply daisyUI colors and styles (border radius, etc) for them. This way, people can simply use an existing datepicker JS package, and it would fit perfectly with their daisyUI theme. |
I searched the issue of styling type="date" and found these helpful links:
Hope this helps other daisyui users :-) |
@jacksonthall22 thank you for your feedback! You can find the code here. Let me know if it is not clear |
I am using DaisyUI as a pure CSS library as I am working with a quite exotic WASM stack. For me it would make sense to add it without JS stuff as OP proposed. |
I would second @gitmalong opinion. |
Is this PR going to merge in the future? |
@tejasv-tagline I appreciate @sovetski's effort 👏 Good news is daisyUI 5 (coming next month) will include styles for 3 calendar libraries:
Example with alpha version: |
Hi,
As I really like this library, I wanted to contribute to its development. I noticed that there are quite a few people looking for a date picker component, so I took the opportunity to create one, because I'll probably need it myself in the future.
I've tried to make this component 100% accessible, but there are certainly improvements to be made. If there's a chance that this component will be accepted, I can try to improve it based on your feedback.
Since the component is accessible, the HTML side of things is a bit verbose, but hey, that's the price to pay to make everyone happy 😅
Certainly, as already indicated in the created issues, it's only the visual part. The JavaScript part will need to be done by developers; perhaps we could provide a working example in JavaScript to give an idea, similar to what's done here: Theme Controller Example.
Demo (with light/dark modes but works with all themes as expected):
Demo with button toggle (works like menu):
Some related issues:
Discussions: