Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SingleDatePicker date switching bug #53

Open
oleholei opened this issue Mar 14, 2022 · 1 comment
Open

SingleDatePicker date switching bug #53

oleholei opened this issue Mar 14, 2022 · 1 comment

Comments

@oleholei
Copy link

Steps for reproduce:

  • When Mounting the component, I set the default date by startDate prop. (Screen 1)

  • Switch the picker on one month earlier (Screen 2)

  • I want to switch to current month back, but the 'next' arrow is disabled (Screen 2, right arrow is disabled)

  • when i click on different days on picker a few times, the 'next' arrow is disabled (Screen 3)

  • when i click on the datepicker block arrows (when dropp-picker is not dropped) and switch day to current month and then change the day on dropped picker, the arrow becomes available (Screen 4)

  • But by switching the month by arrows, layout of picker comes invalid (Screen 5, 6)

Screenshot 2022-03-14 at 14 53 20

image

image

Screenshot 2022-03-14 at 14 54 04

image

image

@oleholei
Copy link
Author

oleholei commented Mar 14, 2022

The component code in the project:

<SingleDatePicker 
        singleCalendar 
        highlightToday
        dateFormat={calendarFormat} // "DD-MM-YYYY"
        startWeekDay="monday"
        startDate={date} // current date on mount
        maxDate={DateUtils.maxDate} // Date of today
        minDate={DateUtils.minDate} // Date of 5 years ago
        startDatePlaceholder={`${dayMonthPlaceholder}-${dayMonthPlaceholder}-${yearPlaceholder}`} // "__-__-___"
        onChange={onChange}
        disabled={disabled}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant