React-datepicker: Add a YearPicker

Created on 3 Oct 2019  路  9Comments  路  Source: Hacker0x01/react-datepicker

It would be perfect to have also a year picker !

All 9 comments

right! imagine clicking a previous month button 200+ times to find your birthday

right! imagine clicking a previous month button 200+ times to find your birthday

Seems like your use case is covered with this:
https://reactdatepicker.com/#example-year-dropdown

No, I wasnt looking for a select of a year inside the calendar.
But more just like the Month Picker but for years (https://reactdatepicker.com/#example-month-picker)

No, I wasnt looking for a select of a year inside the calendar.
But more just like the Month Picker but for years (https://reactdatepicker.com/#example-month-picker)

Makes sense. I was referring to "Selecting your birthday" as being solved.

In your case, perhaps simply making a dropdown of years to select could solve your issue, or a number input field with min and max values?
What would you expect from an implementation in this library?

I'm using this component with date format selected by the user.

The user could choose between MM/DD/YYYY, MM/YYYY and YYYY format.
It should be normal to him to have a datePicker organised differently for each format.

About the select, it's the solution i'm using now even I don't think it's the best solution ;)

This feature is interesting and needed

Adding an option showYearPicker in the same fashion as the existing showMonthYearPicker would definitely be a useful feature.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Added a yearpicker https://github.com/Hacker0x01/react-datepicker/pull/2130

@martijnrusschen this issue can be closed too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjjss94 picture jjjss94  路  3Comments

jcabrerazuniga picture jcabrerazuniga  路  3Comments

ericreis picture ericreis  路  3Comments

formigone picture formigone  路  3Comments

kkras3 picture kkras3  路  3Comments