How can I define TypeScript type for a setState function when React.Dispatch not accepted?

You should set type of setValue inside IDatePickerProps to:

setValue : React.Dispatch<React.SetStateAction<string>>

Or change setValue inside onChangeHandler to:

setValue: (value: string) => void;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)