react-tailwindcss-datepicker
react-tailwindcss-datepicker copied to clipboard
When I click the date picker to choose a date, the selected month is incorrect
When I set the default date for the date picker, which is not in the current month, by setting the value prop in the form {startDate: "YYYY-MM-DD", endDate: "YYYY-MM-DD"} and then click on the date picker to choose a date, the rendered month is incorrect.
In the picture you can see that the default date is 01/08/2023, but the rendered month is 09, when I click to choose a date.
Example of the code for the date picker usage
<Datepicker
value={{
startDate: '2023-08-01',
endDate: '2023-08-01'
}}
asSingle={true}
displayFormat='DD/MM/YYYY'
useRange={false}
primaryColor={'blue'}
/>
I am facing the same issue even though i use the default props with the range. Still it gets the current date and not the selected one.
I am facing the same issue