Material-ui-pickers: Calendar popup not getting closed when used in a Dialog

Created on 13 Jul 2020  路  6Comments  路  Source: mui-org/material-ui-pickers

I am using the latest version - v4.0.0-alpha.9
When we launch the Calender Popup in a dialog, it doesn't close when we click outside the calendar.

Here is the code sandbox to recreate this scenario -

https://codesandbox.io/s/hungry-euclid-mgod9?file=/src/App.jsx

image

image

Expected behavior -
The calendar popup should get closed when clicked outside.

bug 馃悰 DatePicker

All 6 comments

@kvskranthikumar Thanks for the report, it sounds like https://github.com/mui-org/material-ui-pickers/issues/1852#issuecomment-657519201.

Thanks for responding quickly.

I am getting recursive errors as well when using inside dialog -

image

Any idea what could be wrong?

For that, you will need to upgrade to [email protected] or disable the enforce focus logic.

Please help me, how to disable the enforce focus logic?

@kvskranthikumar this would be: (see https://material-ui.com/api/modal/#props)

<Dialog disableEnforceFocus />

Thanks, @BowlingX that worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harvitronix picture harvitronix  路  3Comments

katy6514 picture katy6514  路  3Comments

aditya81070 picture aditya81070  路  3Comments

danmce picture danmce  路  3Comments

benneq picture benneq  路  3Comments