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

Unable to Select Month and Year Properly in DatePicker #5306

Open
otaku0304 opened this issue Jan 7, 2025 · 1 comment
Open

Unable to Select Month and Year Properly in DatePicker #5306

otaku0304 opened this issue Jan 7, 2025 · 1 comment

Comments

@otaku0304
Copy link

Description:
When using the DatePicker component with showMonthYearPicker and dateFormat="MM/yyyy", the calendar initially shows the current date, but when clicking on the month or year dropdown, no months or years are shown for selection.

Steps to Reproduce:
Use the following configuration for DatePicker:

<DatePicker
selectsRange={true}
startDate={startDate}
endDate={endDate}
onChange={handleDateChange}
inline
maxDate={new Date()}
/>

image

Observe that the calendar shows the current date initially.
Click on the month or year dropdown.
No months or years are displayed for selection.

Expected Behavior:
When clicking on the month or year dropdown, the calendar should show the available months or years for selection based on the provided date format (MM/yyyy).

Actual Behavior:
The month and year dropdown does not display any selectable options. The default calendar view still shows the current date.
React Version: 18.x.x
DatePicker Component Version: 7.5.0
Browser: Chrome/Firefox
Operating System: Windows

@balajis-qb
Copy link

I didn't get your issue. In the example you provided, you didn't use showMonthYearPicker. Can you please share the code that's causing an issue?

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

2 participants