material-ui-pickers: Date-io v2: Uncaught RangeError: Format string contains an unescaped latin alphabet character `n`

The @date-io library release a new version v2 that’s break this module.

Please update docs and require install only version 1.X from @date-io in the meantime.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 92
  • Comments: 40 (18 by maintainers)

Most upvoted comments

For others struggling: if you installed @date-io@2.* you might see the error

Uncaught RangeError: Format string contains an unescaped latin alphabet character `n`

For now, downgrade to @date-io@^1.3.13.

Very weird shit, I have to admit.

Would it perhaps be possible to have the proper versions of the @date-io libaries listed as dependencies in this project instead of referring to a note in an installation guide? Tbh I think it’s a bit odd we have to manually manage the @date-io dependencies because @material-ui/pickers doesn’t specify the versions it requires (and so we now have two outdated dependencies in our projects which need to be pinned to the 1.x release for the time being).

Had the same problem, but I had access to this site https://material-ui-pickers.dev/getting-started/installation, which helped me install Date-io V1, enabling the use of datePicker.

Had the same problem, but I had access to this site https://material-ui-pickers.dev/getting-started/installation, which helped me install Date-io V1, enabling the use of datePicker.

give this man a cookie

BTW, @date-io has explicitly stated that in their release Github page

Dislike!

v2 of DateIO will not be supported for v3 of pickers.

Is there any plan to fix this? It was reported on 5th of January and i am still getting this error. That’s more than 2 months for something that prevents me from keeping my libraries up to date.

Also there is a specific version of @date-ui/core that points picker to use and do the peer deps validation.

@dmtrKovalenko Nice, so we are good.


On a side note, I have noticed two potential opportunities:

@dmtrKovalenko Since recently, we can leverage the optional peer dependencies, e.g. https://github.com/mui-org/material-ui/pull/17211, that, I believe would warn if the version is not correct.

Updated the docs. Also pinning this issue to make it easier to resolve the problem for v3 users

They do it! Look here