A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Go to file
Danae Millan db2a74927b Fix calendar not being dismissed when clicked outside (https://github.com/woocommerce/woocommerce-admin/pull/7714)
* Add an 'onBlur' property to the 'DateInput' component

This allows passing a callback function for the input's onBlur event.

* Close the calendar when an element outside the parent dropdown gets focused

Previously, you had to click on the calendar and then click anywhere else for it to be closed without selecting a date. Now the calendar gets closed when any element outside the parent's dropdown element gets thefocus.

* Remove redundant code for dismissing the calendar when pressing the tab key

Dismissing the calendar this way doesn't seem to be good for accessibility. That aside, the introduced dismissal on blur handles the scenario of when the calendar isn't needed anymore and the user is navigating with the keyboard.

* Add changelog entry

* Use the PR ID instead of the issue ID for the changelog entry

* Separate new declaration on a new line instead of using a comma

* Add an entry to the packages/components/ changelog
2021-10-13 08:20:24 +08:00
plugins/woocommerce-admin Fix calendar not being dismissed when clicked outside (https://github.com/woocommerce/woocommerce-admin/pull/7714) 2021-10-13 08:20:24 +08:00