Date & Time pickers, built with ❤️ for @material-ui/core
This release is a part of v4 (#1293) development. v4 is in active development right now and we are planning to create more breaking changes. So please, update wisely ?
Checkout latest documentation ? at https://next.material-ui-pickers.dev/
date-io
adapter by ourselves. So you need to import it from @material-ui/pickers/adapter/date-fns
instead of right from @date-io/date-fns
-import DateFnsUtils from '@date-io/date-fns'
+import DateFnsUtils from '@material-ui/pickers/adapter/date-fns'
<MuiPickersUtilsProvider utils={DateFnsUtils}>
This PR significantly improves pickers localization and accessibility. Documentation for this prerelease is available at https://next.material-ui-pickers.dev/
ampm
prop. Finally pickers will automatically resolve currently used locale settings and will render 12 or 24 hours clock accordingly.en-US
locale). If provided mask is not valid for the current locale we are falling back to the simple unmasked inputdisableMaskedInput
prop just to disable masking at all (force the same behavior ^)We changed literally everything related to accessibility and made pickers finally accessible. Giant thanks to @ahayes91 for help. Please read our new Accessibility guide.
But in short:
aria-label
without the need to set up it manually. Also, added a lot of props to adjust aria-label
text.Space
or Enter
)Make sure that v3 is on support right now, but actively we are working only the next v4 version. Check the first release notes of v4
Here is the first prerelease of material-ui-pickers v4. We are going to ship all the features from the #1293. This alpha is actually the major design upgrade to new material design 2.0 pickers guidelines.
Documentation for v4: https://next.material-ui-pickers.dev/
Use npm @next
tag to install the prerelease version. Make sure that we are going to introduce new breaking changes in prerelease versions.
yarn add @material-ui/pickers@next
ampm
prop is now false
by default.@date-io/{moment/date-fns/any}
adapter to at least v2.0.0
Keyboard*
components exported (like KeyboardDatePicker
). From now any picker will allow keyboard input. For mobile, it is possible using the "pen" icon inside the dialog.variant
prop. Variant now passed right to the mui text field. To force specific wrapper you can use different exported components. Check “Responsiveness” demo for each component.So it is required that your formats will be keyboard friendly (e.g. MM/dd/yyyy
instead of MMMM yyyy
)
<DatePicker
- format="MMMM yyyy"
+ format="MM/dd/yyyy"
/>
variant
prop. By default, the picker will adapt to the user device viewport to render the most convenient wrapper (popover or dialog). But it is possible to force this behavior importing special components. Check out this example
? ? New design and UX ? ?
New animations, improve performance up to 30% for current calendar switching animations
Turn off animations (that are using react-transition-group) by default for Android devices. Use reduceAnimation
prop to configure this behavior.
Better formats override ability for localization. But this feature will be significantly improved in the next prereleases
New way to input am/pm value
It is now the default behavior for desktop mode and DateTimePicker
. Use ampmInClock
to enable this view on mobile.
Hey, we are mostly started work on material-ui-pickers v4 ?. We are going to significantly improve this package, but firstly we need to know how you are using pickers. Share your thoughts at our survey
We are using some stuff from Typescript v3.4. So it is required to update
This is a patch release with the following fixes:
Big thanks to 3 contributors, that make this release possible. ?
readOnly
prop that prevents opening pickersNew patch release, with the following fixes:
onError(undefined)
if error should be cleared