question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Year drop down using <select>

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
iknowcsscommented, May 31, 2016

(It’s in a private repo)

0reactions
jochenbergercommented, Dec 5, 2016

this can probably be closed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found