-
Notifications
You must be signed in to change notification settings - Fork 304
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]: Datepicker light mode - CSS issues #244
Comments
I tried to find an alternative, but this one seems tricky. Indeed, it's difficult to select the start and end date of the range using CSS selectors to apply left or right rounding as required. We soon realize that there are 3 state classes to help us:
The problem is that these states are on child nodes that represent days ( This is why I can't select the range start date and end date with separate selectors. So my other solution was to try using the
Then I added these css:
This only works partially, as the classes are only updated when the end of the range has also been selected. cc @sadeghbarati @zernonia I'd appreciate a little help on this one pls ^^ |
Can you share a individual stackblitz demo just about Calendar with your applied changes? |
~ Sure @sadeghbarati : link removed (The proposed solution was bad) |
@sadeghbarati, I finally took 30 minutes to reread the source code of the base component (VCalendar) and discovered that a child div and classes to find out the start/end of the range already existed:
So I've just added a PR #251 that fix the CSS issues with minimal code |
Environment
Link to minimal reproduction
https://stackblitz.com/edit/tdkd3r-vmywib
Steps to reproduce
Use the Datepicker in range mode like in the documentation: https://www.shadcn-vue.com/docs/components/date-picker.html
Describe the bug
If the range is a complete week, it's working as expected:
On the other hand, when it's a day in the middle of the week or overlaps several weeks, the gray background behind is not rounded for the start and end dates:
Expected behavior
No response
Conext & Screenshots (if applicable)
No response
The text was updated successfully, but these errors were encountered: