stimulus-datepicker icon indicating copy to clipboard operation
stimulus-datepicker copied to clipboard

Trigger automatically when input is focused

Open YANOUSHek opened this issue 7 months ago • 2 comments

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.

YANOUSHek avatar Jul 16 '24 14:07 YANOUSHek