Material-ui-pickers: DateRangePicker closes on first click when in Popover

Created on 9 Sep 2020  路  8Comments  路  Source: mui-org/material-ui-pickers

When putting the Daterangepicker inside the Popover Component from Material-UI and trying to go back a month, the picker automatically closes on the first click no matter where.

DateRangePicker duplicate

All 8 comments

@BjoernRave We should have solved this issue when used with core v5-alpha.

Please provide a minimal reproduction test case. This would help a lot 馃懛 .
A live example would be perfect. This codesandbox.io template _may_ be a good starting point. Thank you!

Hey @oliviertassinari sure, here is the reproduction: https://codesandbox.io/s/agitated-vaughan-eimc8?file=/src/App.jsx

What do you exactly mean by:

We should have solved this issue when used with core v5-alpha.

That the fix for this problem will only be usable for v5 ?

@BjoernRave Thanks for the reproduction but it's not a valid combination of dependencies. The fix is only available with v5 alpha.

@oliviertassinari what, how is it not a valid combination of dependencies? Because it used alpha12 of the pickers library? It was already set like that when using your template and it's the same behavior when using alpha10 which is supposed to work with v4.

Okay so that's great to hear that it's fixed in v5.

Can you maybe point me to the code where it's fixed so I can fix it with patch-package sind v5 will still take some time?

Thanks for mentioning it, the initial template I have linked needs to be updated.

KO

dependencies": {
    "@material-ui/core": "latest",
    "@material-ui/pickers": "next",

OK

dependencies": {
    "@material-ui/core": "next",
    "@material-ui/pickers": "next",

Codesandbox template updated, it will avoid future confusion like this.

Can you maybe point me to the code where it's fixed so I can fix it with patch-package sind v5 will still take some time?

Search for click away portal support.

@oliviertassinari okay, thanks for the hint :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

idrm picture idrm  路  3Comments

basselAhmed picture basselAhmed  路  3Comments

filipenevola picture filipenevola  路  4Comments

katy6514 picture katy6514  路  3Comments

benneq picture benneq  路  3Comments