stimulus-datepicker
stimulus-datepicker copied to clipboard
Trigger automatically when input is focused
Hi. I was trying to get the calendar to work automatically without a specified toggle. There's a couple small places where the toggle
is required (missing checks for hasToggleTarget
). But after that, when I added data-action="focus->datepicker#toggle"
to my input the calendar steals the focus and disappears.
Trying to get this working myself I wasted quite some time that I can't really spare right now. Would you be willing to add this option to the datepicker? So it isn't triggered explicitly by clicking the toggle but automatically when the input field it's attached to is focus (but still leaving the option to enter the date using the keyboard)?
I might find some time for this later but I'm not really sure.