After upgrading to version ^1.0.0 there is an typescript error.
| Tech | Version |
|---------------------|---------|
| material-ui-pickers | ^1.0.0 |
| material-ui | ^3.3.1 |
| React | ^16.6.0 |
| Browser | irrelevant |
| Peer library | "date-fns": "2.0.0-alpha.16" |
/node_modules/material-ui-pickers/utils/date-fns-utils/index.d.ts
(2,8): Module ''date-fns/locale/en-US'' has no default export.
Until this is fixed, you can use "skipLibCheck": true option in your tsconfig.json.
Could you enable esModuleInterop option in ts config?
Yep, that solves the problem. Could you mention it in docs or somewhere else, because the default for this option is false. (https://www.typescriptlang.org/docs/handbook/compiler-options.html)
PR is appreciated
Would not be better to fix it for date-fns as it is suggested for moment in this PR https://github.com/dmtrKovalenko/material-ui-pickers/pull/712 ?
I don't think so. Default behaviour is wrong and makes ecosystem broken. Imported namespace cannot be callable.
Most helpful comment
PR is appreciated