Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration to material-ui-pickers 2.x #17

Merged
merged 4 commits into from
Jan 21, 2019
Merged

migration to material-ui-pickers 2.x #17

merged 4 commits into from
Jan 21, 2019

Conversation

vascofg
Copy link
Owner

@vascofg vascofg commented Nov 27, 2018

Won't be able to merge this until react-admin updates to @material-ui/core 3.2.0 or above, because of this:
mui/material-ui-pickers@8b35d65

This is the module that must be updated: https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/package.json

Copy link

@sonoy sonoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I got this error after I tried to open the picker.

TypeError: _this.props.utils.startOfMonth is not a function
in Calendar (created by Context.Consumer) 
in WithUtils(Calendar) (created by WithStyles(WithUtils(Calendar))) 
in WithStyles(WithUtils(Calendar)) (created by DateTimePicker) 
in div (created by DateTimePickerView$2) 
in DateTimePickerView$2 (created by DateTimePicker) 
in div (created by DateTimePicker) 
in DateTimePicker (created by Context.Consumer) 
in WithUtils(DateTimePicker) (created by BasePicker)
...

Updated:

Solved by modifed the package.json

"dependencies": {
    "@date-io/date-fns": "^1.0.1",
    "date-fns": "2.0.0-alpha.25",
    "material-ui-pickers": "^2.1.1"
  }

Also, please keep these lines:

onChange: function onChange(date) {
                return _this2.onChange(date);
              }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants