react-tailwindcss-datepicker icon indicating copy to clipboard operation
react-tailwindcss-datepicker copied to clipboard

When I click the date picker to choose a date, the selected month is incorrect

Open dograshvili opened this issue 2 years ago • 2 comments

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.

image 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'}
/>

dograshvili avatar Sep 04 '23 09:09 dograshvili

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.

sikelos13 avatar Sep 05 '23 10:09 sikelos13

I am facing the same issue

Amanullah-M360ict avatar Sep 23 '24 04:09 Amanullah-M360ict