Skip to content

Open/close picker when input is focused/blurred #38

@billdami

Description

@billdami

I'm looking to more closely mimic the behavior of the PIkaday picker (i.e. like the one in this demo: https://pikaday.com/) where the picker calendar will open when the input is focused by tabbing into the field, and the closed when the input field loses focus via tabbing away (while still maintaining the ability to open/close it via clicking the input/clicking elsewhere).

Is there a existing pattern for accomplishing this? Trying something like a simple onfocus={{dp.actions.open}} action on the input seems to conflict with the ability to close on selection, as the input regains focus after selecting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions