Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker: On clicking outside the Datepicker window should be closed. #999

Closed
Palashd55 opened this issue Jan 13, 2023 · 1 comment
Closed
Labels
enhancement New feature or request react Needs change in react package

Comments

@Palashd55
Copy link

Hi Team,
It will be nice if during selecting Date and time from the datepicker window when a user clicks outside, the window should be closed.
Thanks.

@Palashd55 Palashd55 added the enhancement New feature or request label Jan 13, 2023
@gretanausedaite gretanausedaite added the react Needs change in react package label Jan 13, 2023
@mayank99
Copy link
Contributor

DatePicker does not handle any popover behavior (there is no "open"/"closed" state). You are expected to connect the DatePicker with your own popover (e.g. floating-ui) which will give you a way to handle outside clicks.

Alternatively, you can temporarily use our internal Popover. See this sandbox for an example of how to handle outside clicks (from iTwin/iTwinUI-react#674): codesandbox.io/s/itwinui-react-datepickerinput-vq3rmi

Note that Popover is marked internal and currently uses @tippyjs/react which we plan to migrate away from (#914), so the API will likely change in our next major release.

@mayank99 mayank99 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react Needs change in react package
Projects
None yet
Development

No branches or pull requests

3 participants