Getting an error: format string contains an unescaped latin alphabet character `n`
ArunKadariCS opened this issue · 1 comments
I'm facing two errors while trying to customize and abstract the material UI pickers.
Here is the codesandbox
https://codesandbox.io/s/gallant-kowalevski-sz6up?file=/src/Test.js
-
format string contains an unescaped latin alphabet character
n
-
Errror message
Cannot update a component (App
) while rendering a different component (Test
). To locate the bad setState() call insideTest
, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
at Test (https://sz6up.codesandbox.io/src/Test.js:113:17)
at div
at App (https://sz6up.codesandbox.io/src/App.js:28:39)
The v2 of @date-io is causing this error. 😢
For now, downgrade to v1.x version of @date-io.
I faced the same issue and downgraded to 1.3.13 and now its working perfectly. 😃
Important: For material-ui-pickers v3 use v1.x version of @date-io adapters.
It is also mentioned in material-ui-pickers docs