Skip to content

Date pickers not closing when clicking on other input. #1545

Open
@robertovg

Description

@robertovg

Basically, when you open the date picker to input a date and before you select the value you click in other input, the open date picker is not closed automatically as it's happening with combo boxes, dropdowns any other input component you provide.

I prepared a very simple code sandbox where you can test it.

https://codesandbox.io/s/pyj9olvqj

I hope it's easy to understand, I tried using all the properties provided in the official docs: and it's always happening. Even tried to control the isOpen manually rendering a controlled <Input /> inside the <DatePicker /> but the problem is when it's open the inner <Input /> always loses the focus because of the dropdown date picker gets it.

How do you think I could make them close automatically after any other click outside the inner <Input /> or Datepicker dropdown even if it's another input the new one which gets the focus?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions