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 dates bug?

See original GitHub issue

I worked with react-bootstrap-date-picker in the pasts and never have a problem.

Iā€™m passing to the <DatePicker /> component the minDate maxDate props (like always) and, well, im getting this error:

Uncaught TypeError: Cannot read property ā€˜sliceā€™ of undefined

The dates are strings, ISO strings to be precise:

minDate: 2017-06-01T00:00:00.000Z maxDate: 2017-06-30T00:00:00.000Z

And the code:

<DatePicker
  minDate='2017-06-01T00:00:00.000Z'
  maxDate='2017-06-30T00:00:00.000Z'
/>

Any idea? This never happened before.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
seangaritacommented, Oct 23, 2017

@glennWerner Itā€™s because of this month old issue: https://github.com/pushtell/react-bootstrap-date-picker/issues/139 . Unclear why the package has not been able to be updated.

1reaction
JonShortcommented, Sep 25, 2017

Iā€™ve merged PR #137 - so this bug should be fixed now šŸ‘

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 >
FIX: An Unhandled exception occurs when you set MinDate or ...
When you set the MinDate or MaxDate property for the DateTimePicker control, you receive the following error message: Unhandled exception is thrown on...
Read more >
datepicker minDate and maxDate with new Date(...) does not ...
When using minDate: "-14d" and maxDate: "+90d", the user cannot move the month past the min and max date. (e.g. if min date...
Read more >
APEX 4 - Bug - default jQuery UI Datepicker - minDate maxDate
I had the same problem. My solution was manually with jQuery to eliminate the minimum date for the item I needed without minimum...
Read more >
Client Error When Setting MinDate or MaxDate
As a workaround, you can use the relevant properties of the embedded Calendar and DatePickers to set the Min and Max allowed dates...
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