Material-ui-pickers: TypeError: utils.getYearText is not a function when updating @date-io/moment to v2.0.1

Created on 8 Jan 2020  路  2Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
| -------------------- | ------- |
| @material-ui/pickers | 3.2.8 |
| material-ui | 4.8.2 |
| TypeScript | |
| React | 16.12 |
| Browser | chrome |
| Peer library | @date-io/moment | |

Steps to reproduce

Updated @date-io/moment to version 2.0.1

Expected behavior

get back getYearText function

Actual behavior

utils.getYearText is not a function

Reverted back to "@date-io/moment": "^1.3.13" and everything works fine

Live example

Screenshot at Jan 08 14-57-58

Most helpful comment

This happened to me when I installed the latest version of @date-io/dayjs with dayjs. I was able to fix it by instead installing version 1.x of date-io, as mentioned in the docs:

$ npm install @date-io/[email protected]

This will install the latest version under the 1.x series.

All 2 comments

Duplicate of #1440

This happened to me when I installed the latest version of @date-io/dayjs with dayjs. I was able to fix it by instead installing version 1.x of date-io, as mentioned in the docs:

$ npm install @date-io/[email protected]

This will install the latest version under the 1.x series.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

filipenevola picture filipenevola  路  4Comments

harvitronix picture harvitronix  路  3Comments

nicky-dev picture nicky-dev  路  3Comments

killjoy2013 picture killjoy2013  路  3Comments

Lysander picture Lysander  路  3Comments