mui / material-ui-pickers

Date & Time pickers for Material UI (support from v1 to v4)
https://github.com/mui/material-ui-pickers/issues/2157
MIT License
2.32k stars 832 forks source link

Minimal example of how to use the DateTimePicker without being associated to an input field #2197

Closed simplenotezy closed 3 years ago

simplenotezy commented 3 years ago

Summary 💡

I would like to use the DateTimePicker when a user has clicked on a button, but without showing an actual user input. I found https://github.com/mui-org/material-ui-pickers/issues/1855 as supposedly it should be possible, but as a newcomer to this library it would be nice to play around with a minimal example.

Motivation 🔦

This is a really great library for picking dates, and IMO it shouldn't be limited to only text inputs.

simplenotezy commented 3 years ago

Found this after a bit of google searching 😊 https://material-ui-pickers.dev/demo/datepicker#static-mode