jps
jps
TTCTheo's Typesafe Cult
Created by jps on 7/14/2023 in #questions
Type error w/ Dates & shadcnui
Type error: Type '(event: Date | ChangeEvent<Element>) => void' is not assignable to type 'SelectSingleEventHandler'.
Types of parameters 'event' and 'day' are incompatible.
Type 'Date | undefined' is not assignable to type 'Date | ChangeEvent<Element>'.
Type 'undefined' is not assignable to type 'Date | ChangeEvent<Element>'.
Type error: Type '(event: Date | ChangeEvent<Element>) => void' is not assignable to type 'SelectSingleEventHandler'.
Types of parameters 'event' and 'day' are incompatible.
Type 'Date | undefined' is not assignable to type 'Date | ChangeEvent<Element>'.
Type 'undefined' is not assignable to type 'Date | ChangeEvent<Element>'.
Hey there. Been getting this error working with the Calendar component he has. Been getting this build error in Vercel, whereas in vscode I'm getting a build passed. Anyone have any idea? See code in the comments.
7 replies