Comments (3)
I've been following the WAI-ARIA date picker dialog design pattern, and I understand it to mean the calendar should show and hide based on clicking (or the keyboard equivalent) the toggle button.
Having said that, I just re-read the pattern and it doesn't really specify one way or the other. I think it used to but they seem to have updated it since I built the datepicker. Their example code still requires clicking a toggle button.
Anyway, you could listen for the text field's focus event and then trigger a click event on the toggle element. Either with plain JavaScript or a tiny Stimulus controller of your own.
from stimulus-datepicker.
you actually can't bc the click event trigger on toggle will close the datepicker again 😢 just tried 😃. It basically opens and closes.
from stimulus-datepicker.
Thanks @hmontazeri. I'm going to close this because I don't think the calendar should behave this way by default, and it's straightforward to handle the event if you really want to.
from stimulus-datepicker.
Related Issues (19)
- Support min and max dates HOT 2
- Allow declaring arbitrary dates unselectable
- Add dark theme
- Unable to dismiss calendar HOT 6
- flex framework is throwing off fit-content and objects sizes HOT 9
- Switch tests from Cypress to Playwright?
- Optimise for near dates HOT 1
- Use CSS custom properties for all colours
- Dispatch change event only when dateValue has changed HOT 3
- Not possible to subclass HOT 3
- Feature request: add a "clear" function HOT 1
- Improve month and year selects HOT 2
- Make titles and labels configurable HOT 2
- Fix demo page on iPhone HOT 1
- Fix calendar's navigation buttons on iPhone HOT 1
- Does not display dates before the year 2000 HOT 1
- Allow making weekends unselectable
- Breaks when user jumps to month where no dates are selectable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stimulus-datepicker.