-
-
Notifications
You must be signed in to change notification settings - Fork 805
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
added sl-date-picker component #486
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/shoelace/shoelace/3SB5843W9c3jFyy9bybLdS9wAzYV |
Also just noticed that tabbing through in the month and year views loops through the header, so the months/years aren't keyboard accessible without focusing on them first with the mouse. |
Why? If criticism is constructive, and it is useful to improve my work, it is well accepted. Otherwise, what is the purpose to share the code with other people? 😄
I'm working on this. I want to create a new internal helper class, to use when you want to capture mouse/touch events.
Yes, it is currently a loop. How should the navigation priority be set with the tab key? The path described above is used in the duet calendar. Instead, for the online calendar?
For this issue, I have to disable the automatic month selection when I re-render the view, and it should be fixed.
Vertical navigation between months should be changed. Your proposal makes more sense.
Currently, the "Calendar" class offer simple methods for working with dates, and can generate
|
Because you're doing great work and putting a lot of time and effort into contributing! I don't want to discourage you from that or undervalue your effort. You've been tackling some of the much more difficult components/APIs and with that territory comes a lot of little things, nitpicks, details, and polish that make it difficult to get to the finish line. I can't help but feel a bit of guilt because my standard for quality is very high in this project. I'd rather overthink these things and build them out multiple times to make sure we get it right rather than rush it in. Longevity is a key objective of Shoelace, and some may perceive this as a high barrier of entry for contribution.
This would render the calendar inline, giving users the ability to show a read only calendar or a potentially interactive one. Thinking further ahead, it might be possible to allow the user to display events on certain days. There could be a lot of overlap in features, so the thought of breaking it out came up. It would be easier to test as well. |
Hi @claviska, these latest commits are a complete rework of the
I have split the code into two components as suggested. The code is now easier to manage.
I focused my work on this part, to create a small and reusable calendar library. What is missing from these latest commits:
|
@hanc2006 @claviska Just as a side note:
As it is a hell of work (implementing and reviewing and discussing etc) to finalize this, an option could be to split work a bit and to use a 3rd party "calendar sheet" in Here's a little Demo using In file Basically, something that I have already suggested a couple of month ago in #101. There has not been any response then, so maybe such a solution is not wanted in the first place ... anyway ... [Edit] Important: The demo uses that |
Shoelace is a web component library. Using a third-party library to replace a web component doesn't make much sense. It would make more sense to use a third-party library like moment.js or something similar to support a component behavior. For |
Of course it makes complete sense. This
This demo is mainly about "view" not about I18n ... the only I18n relevant is that the demo shows that It was just a proposal to save some time. If there's enough time for implementing and reviewing 100% self-written full-fledged date components before the v2.0 release, fine 😉.... [Edit - as also appended to the comment above] Important: The demo uses that |
This branch is stale. If you merge
It looks like the calendar doesn't have any keyboard nav unless it's inside a date picker. Is this intentional? |
It's a task I have to complete but I need more time. Any other remarks? This feature sl-format-date integration with date library that I added what do you think? |
I'm going to close this PR because it's very stale now and there are a number of known issues. I've been experimenting with a Calendar component in the |
New
sl-date-picker
component to shoelace library. This PR replaces the old one #474