mui / material-ui-pickers

Date & Time pickers for Material UI (support from v1 to v4)
https://github.com/mui/material-ui-pickers/issues/2157
MIT License
2.32k stars 832 forks source link

Type [...] | "onYearChange"' does not satisfy the constraint #2175

Closed didje251 closed 3 years ago

didje251 commented 3 years ago

Similarly to another issue found here, but solution is not working for my setup..

Tech Version
@material-ui/pickers 3.2.10
material-ui 4.11.3
React 16.14.0
TypeScript 3.3.3333

Steps to reproduce

import and use DateTimePicker and DatePicker

Expected behavior

No error

Actual behavior

Getting comnpilation error:

Failed to compile.

h:/work-new/ACE-Web-Widgets/node_modules/@material-ui/pickers/_helpers/text-field-helper.d.ts
(27,219): Type '[...] | ... 305 more ... | "onYearChange"' does not satisfy the constraint '"required" | "disabled" | "error" | "hidden" | "dir" | "label" | "select" | "slot" | "style" | "title" | "open" | "about" | "contextMenu" | "color" | "size" | "key" | "ref" | "children" | ... 306 more ... | "openTo"'.
  Type '"onAuxClick"' is not assignable to type '"required" | "disabled" | "error" | "hidden" | "dir" | "label" | "select" | "slot" | "style" | "title" | "open" | "about" | "contextMenu" | "color" | "size" | "key" | "ref" | "children" | ... 306 more ... | "openTo"'.