Material-ui-pickers: Type errors with @material-ui/core 3.9.2

Created on 3 Feb 2019  路  3Comments  路  Source: mui-org/material-ui-pickers


A GIF or MEME to give some spice of the internet

Environment

| Tech | Version |
|---------------------|---------|
| material-ui-pickers | 2.1.2 |
| material-ui | 3.9.2 |
| React | 16.8.0-alpha.1 |
| Browser | Chrome |
| Peer library | "@date-io/moment": "1.0.2" |

Steps to reproduce

  1. Update @material-ui/core from 3.9.1 to 3.9.2
  2. npm i
  3. npm start

Expected behavior


no errors

Actual behavior

node_modules/material-ui-pickers/DatePicker/components/Calendar.d.ts(65,70):
TS2344: Type '"date" | "classes" | "onChange" | "innerRef" | "theme" | "minDate" | "disablePast" | "disableFuture" | "maxDate" | "shouldDisableDate" | "leftArrowIcon" | "rightArrowIcon" | "renderDay" | "allowKeyboardControl"' does not satisfy the constraint '"date" | "classes" | "onChange" | "theme" | "utils" | "minDate" | "disablePast" | "disableFuture" | "maxDate" | "shouldDisableDate" | "leftArrowIcon" | "rightArrowIcon" | "renderDay" | "allowKeyboardControl"'.
  Type '"innerRef"' is not assignable to type '"date" | "classes" | "onChange" | "theme" | "utils" | "minDate" | "disablePast" | "disableFuture" | "maxDate" | "shouldDisableDate" | "leftArrowIcon" | "rightArrowIcon" | "renderDay" | "allowKeyboardControl"'.
ERROR in node_modules/material-ui-pickers/DateTimePicker/components/DateTimePickerHeader.d.ts(18,82):
TS2344: Type '"date" | "classes" | "innerRef" | "ampm" | "openView" | "meridiemMode" | "onOpenViewChange" | "setMeridiemMode"' does not satisfy the constraint '"date" | "classes" | "utils" | "ampm" | "openView" | "meridiemMode" | "onOpenViewChange" | "setMeridiemMode"'.
  Type '"innerRef"' is not assignable to type '"date" | "classes" | "utils" | "ampm" | "openView" | "meridiemMode" | "onOpenViewChange" | "setMeridiemMode"'.
ERROR in node_modules/material-ui-pickers/TimePicker/TimePicker.d.ts(45,72):
TS2344: Type '"date" | "seconds" | "classes" | "onChange" | "innerRef" | "theme" | "ampm"' does not satisfy the constraint '"date" | "seconds" | "classes" | "onChange" | "theme" | "utils" | "ampm"'.
  Type '"innerRef"' is not assignable to type '"date" | "seconds" | "classes" | "onChange" | "theme" | "utils" | "ampm"'.

Live example

Most helpful comment

Works now with 2.2.0

All 3 comments

I am getting the same error

Looks like this was probably caused by mui-org/material-ui#14333, which removed the innerRef field from WithStyles.

Works now with 2.2.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aditya81070 picture aditya81070  路  3Comments

idrm picture idrm  路  3Comments

sakulstra picture sakulstra  路  3Comments

mnemanja picture mnemanja  路  3Comments

filipenevola picture filipenevola  路  4Comments