-1

how to disable the past years in year drop down list in react date picker? the problem is when we click the drop down list it shows past years as well as future year.I want show the current and future years enter image description here

Abishek
  • 47
  • 1
  • 1
  • 7

1 Answers1

0

You can pass the prop minDate to the DatePicker component, and set it to the start of the current year.

<DatePicker
  minDate={moment().startOf('year')}
/>;
Tholle
  • 108,070
  • 19
  • 198
  • 189