Open heecheon92 opened 1 year ago
In the doc, demo code shows as follow:
import React, {useState} from "react"; import Datepicker from "react-tailwindcss-datepicker"; const App = () => { const [value, setValue] = useState({ startDate: null endDate: null }); const handleValueChange = (newValue) => { console.log("newValue:", newValue); setValue(newValue); } return ( <Datepicker value={value} onChange={handleValueChange} showShortcuts={true} /> ); }; export default App;
But using "strict" type-checking option enabled, above code doesn't work.
I suggest following demo code to be updated on the doc.
import React, {useState} from "react"; import Datepicker, { DateValueType } from "react-tailwindcss-datepicker"; const App = () => { const [date, setDate] = useState<DateValueType>(null); return ( <Datepicker i18n={"ko"} asSingle={true} useRange={false} value={date} onChange={setDate} /> ); }; export default App;
version: "react-tailwindcss-datepicker": "^1.6.6"
In the doc, demo code shows as follow:
But using "strict" type-checking option enabled, above code doesn't work.
I suggest following demo code to be updated on the doc.
version: "react-tailwindcss-datepicker": "^1.6.6"