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.

minDate & maxDate don't work with Month Picker

See original GitHub issue

I have this DatePicker component:

<DatePicker selected={new Date()} onChange={date => {this.changeFiltersDates(date, type)}} dateFormat="MM/yyyy" showMonthYearPicker className="private-date-filter" name="from" calendarClassName="date-filter-calendar" placeholderText="From" minDate={this.defaultMinDate} maxDate={this.defaultMaxDate} />

where

this.defaultMinDate = new Date(2017, 0, 1); this.defaultMaxDate = new Date(); but DatePicker component dont’t work correctly, because don’t respect the minDate and maxDate props.

minDate allows the selection of an extra year back and maxDate allows the selection of one more year ahead.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gautam-pahujacommented, Jun 19, 2019

@nonconformatevi Can you please close this issue if it’s no longer valid.

1reaction
daddymanacommented, Apr 10, 2019

Thanks very much @gautam-relayr!

Read more comments on GitHub >

github_iconTop Results From Across the Web

datePicker minDate and maxDate do not work - Stack Overflow
minDate is "10/21/2014" and maxDate is "6/30/2015". The outcome when I click on the input box to select a date is calendar months...
Read more >
Datepicker Widget - jQuery UI API Documentation
The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and...
Read more >
How to Set minimum and maximum date in jQuery UI Datepicker
With minDate and maxDate options, you can restrict date range of jQuery UI Datepicker widget. The user will only able to select the...
Read more >
ion-datetime
Which values you want to select. 'date' will show a calendar picker to select the month, day, and year. 'time' will show a...
Read more >
Set datepicker min date from another datepicker
Hi everyone, I have two datepickers that should work together as a From -> To range where the max date is always the...
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