Year drop down using <select>
See original GitHub issueI’d really love to have an option to show the year drop down as a traditional <select>
instead of the control that is there now. I’m willing to implement and create a pull request. I wanted to check first with the author and collaborators.
- Is this an acceptable feature?
- If so, what would you like the API to be?
The one situation that I don’t know how to handle is the one where there is not a limit on both the upper and lower bounds of the date picker year. How would the group like to handle this?
Just taking a stab in the dark here at an api:
<DatePicker
selected={this.state.startDate}
onChange={this.handleChange}
showYearDropdown
yearDropdownType="select"
dateFormatCalendar="MMMM" />
yearDropdownType
options would be select
and scroll
, default to scroll
.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to Dynamically Populate a Year Dropdown With JavaScript
Does your web app need a dropdown with selectable years? ... here's a quick and easy way to dynamically populate it with a...
Read more >getting current year in a dropdown of years - Stack Overflow
First get current year,; Then run loop starting from currentyear -2 to currenct year + 3; Make current year selected. See code below:....
Read more >HTML Drop down Select Year Month Day List | Arabic Year List
HTML Years Drop down Select List ... Give the number of years from which the year should begin and click generate button. And...
Read more >Dynamically populate Year in DropDownList (SELECT) using ...
Inside the window.onload event handler, first the DropDownList i.e. HTML SELECT element is referenced and then the Current Year is determined ...
Read more >Month And Year Dropdown In HTML - TalkersCode.com
As, we already discuss there are many ways with the help of which you are able to get month and year from user....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
(It’s in a private repo)
this can probably be closed.