Material-ui-pickers: Selecting a date should close the picker

Created on 13 Apr 2020  路  2Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
| -------------------- | ------- |
| @material-ui/pickers | v4.0.0-alpha.5 |

Steps to reproduce

  1. Open https://next.material-ui-pickers.dev/demo/datepicker#basic-usage
  2. Click on the first calendar icon
  3. Select a date
  4. The popup is still open

Expected behavior

The popup should close.

I think that we could consider a disableCloseOnSelect prop as the Autocomplete has for the current behavior.

breaking change bug 馃悰 DatePicker important

Most helpful comment

FYI autoOk={true} does this

All 2 comments

FYI autoOk={true} does this

@CarsonF Thanks for raising this point up. It seems that we should handle desktop and mobile the opposite way, meaning autoOk={true} on a pointer device and autoOk={false} on a touch device. This would match the experience that is most commonly implemented. For instance, take Google Calendar, or Gmail as an example (compare the mobile app, with the web app).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

basselAhmed picture basselAhmed  路  3Comments

danmce picture danmce  路  3Comments

Lysander picture Lysander  路  3Comments

brett-patterson picture brett-patterson  路  3Comments

killjoy2013 picture killjoy2013  路  3Comments