Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does material-ui have a date-picker?

Tags:

material-ui

I installed material-ui "^1.0.0-beta.36". The documentation says there's date-picker.

But I can't find it in node_modules\material-ui , nor in any of the subfolders.

The change log suggests that a datepicker is planned to be supported in future releases:

1.0.0-beta.17 - Oct 16, 2017

As this garbage collection stabilize, we will be able to add new features, like a stepper, extension panel or date/time pickers. But we are not here yet.

like image 612
user690954 Avatar asked Feb 15 '26 22:02

user690954


1 Answers

Material-ui v1 currently provides several date pickers. However, there's no specific DatePicker component.

Instead, you use the type prop of the TextField component to specify that you want a date picker rather than your typical text input. Here's an example that will give you a classic date picker:

import TextField from 'material-ui/TextField';

<TextField
  type="date"
  defaultValue="2017-05-24"
/>

There are also other pickers with more than just the date. For example:

  • Time Picker: type="time"
  • Date and Time Picker: type="datetime-local"

You can find more information about this on the pickers page of the docs.

like image 75
Jules Dupont Avatar answered Feb 21 '26 14:02

Jules Dupont



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!