Closed afilp closed 6 years ago
Options can be passed to the picker through the options prop. Available options are defined here:
https://material-ui-pickers.firebaseapp.com/demo/datepicker
Please refer to the Options prop
part of the README: https://github.com/vascofg/react-admin-date-inputs#options-prop where I state this
Ok, I was actually referring to react-admin
functions of parse
and format
, as noted here:
https://github.com/marmelab/react-admin/blob/master/UPGRADE.md#dateinput-stores-a-date-string-instead-of-a-date-object
I understand however that this does not apply in your lib?
"The value of the <DateInput>
used to be a Date object. It's now a String, i.e. a stringified date. "
I see that your dates are now a Date object, like it used to be before?
Thanks for any clarification!
Indeed those concept don't really apply to this at the moment.
The options you should consider are the ones from material-ui-pickers
since that's what's used here.
Returned dates from the Picker are Date
objects, using date-fns@2.0.0-alpha.7
as specified here https://material-ui-pickers.firebaseapp.com/installation.
PS: A pull request to make this more compliant with react-admin
would be welcome.
@vascofg Hi! I was wondering if there is something new with this, we wanted to use the parse/format as the data are different in redux-form than in the DatePicker. Thanks!
I tried to use them but I get an error due to an "undefined" value in
parse
, as a result of theonBlur
function being called without thedate
parameter:Am I missing something?
Thanks.