-
-
Notifications
You must be signed in to change notification settings - Fork 148
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(DatePicker): DatePicker implementation #674
Conversation
WHOAAAAA @epr3 !! I was just started looking into this, and you already have the PR ready!!! I'll review it shortly ya! 💚 |
… for filling in the day
@epr3 Thanks for your time ❤️ Found a source that can guide you to add
I don't know which one is more convenient
or it should be done in @zernonia wdyt? |
@sadeghbarati Thank you for your guidance. I'm leaning towards implementing the The only thing that I don't know how I should approach for this feature is what should the values be if Shadcn Svelte seems to have used a couple of selects for the month and year. What do you think? |
478302f
to
a86da7c
Compare
@epr3 It's nice that you create new Primitives for it ❤️ And also use Vue features like slotProps 💚
Can you make a demo of this problem? You can push it in this PR so we could checkout to your branch and see what we can do about it MuiX DatePicker demos might be helpful |
@epr3 why remove the |
They seem redundant, since the |
@zernonia - I've added back the I also would need some guidance on this issue if possible: Do you have any idea on how we could properly handle the A lot of errors pop up due to the fact that Vue seems to drop nested values of |
@epr3 unfortunately I dont think we can have a solution for now, as it seems like a problem with Vue. https://www.reddit.com/r/vuejs/comments/xbfa3x/prop_as_a_typescript_class_object/ (relevant playground too see the types broken down by However we can get this PR merged. Absolutely banger job @epr3 !!!! 🤩 |
Nice! Looking forward to seeing this in Shadcn! @zernonia will you do a custom styling of the component to replace the old one, or as an entirely new one? |
This issue might help vuejs/core#8149 I had the same issue but I went with
|
@zernonia Thank you very much! Glad I could help. I'll still have a look around and see if I can work around Vue with I'll make a PR if I get any better results. |
I would like to express my gratitude and emphasize the importance of component libraries that are consistently developed with accessibility in mind. I work for a service provider that creates websites for public entities (e.g., websites for municipalities and cities, which are legally required to be accessible!). We are legally obligated to implement guidelines that ensure accessibility. In Germany, these guidelines are known as BITV 2.0 ("Barrierefreie Informationstechnik-Verordnung 2.0"). Your framework and your work are incredibly important. Thank you! |
Hello @epr3, how do you pass a DateTime instead of a Date? I need to control the time too. I see that Could you please give me a hint on how to do this (with an example) ?
Congratulations on your work! It's fantastic! |
Hello @valh1996, You would need to use The |
Ok, thanks, so if I understand correctly, the calendar doesn't support the time, so I have to manage it myself? |
Yes, you would need to build the time picker yourself. |
I will send a Stackblitz demo with a description, but with a single calendar date If you are in Discord, feel free to DM me or send us your Discord ID https://stackblitz.com/edit/rmqdng-4zeuhv lul Stackblitz demo is the Composition of Calendar and DateField which is these components connected to the With let time = new Time(8, 30);
const value = ref(toCalendarDateTime(today(getLocalTimeZone()), time)) as Ref<DateValue>;
// or
const value = ref(toCalendarDateTime(today(getLocalTimeZone()))) as Ref<DateValue>;
With
|
Closes #379.
Hello,
First of all, I want to say thank you for this awesome library.
I implemented this feature taking inspiration from https://melt-ui.com/, https://www.bits-ui.com/docs/introduction and https://react-spectrum.adobe.com/react-stately, plus the examples provided on the issue.
The components that I've implemented are:
The last two are basically composing the field components, the calendar components and the popover component and are re-exporting them under the DatePicker/DateRangePicker naming.
The components are fully navigable by keyboard and should have all accessibility tags.
I open this as a draft PR because it still needs some stuff added to it.
The things that I did not manage to implement are: adding documentation, styling for the components in Histoire, usage examples, general cleanup and do some refactoring to clean the code and prevent unnecessary re-renders.
I appreciate any feedback and will implement any refactor, bugfix or feature required.