Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Cannot read property 'slice' of undefined" bug with min/max dates #137

Merged
merged 1 commit into from
Sep 25, 2017

Conversation

travellingprog
Copy link
Contributor

@travellingprog travellingprog commented Aug 31, 2017

Description

This fixes a bug in makeDateValues() that occurs if you specified a min and/or max date, but have set the value of the control to null or an empty value. It was caused by some typos.

You can reproduce this issue by set minDate (and/or maxDate), clicking to change the date, and then deleting the value.

Motivation and Context

This fixes a bug that causes a runtime error that prevents makeDateValues() from fully running. That has other implications, including the onChange handler not running.

In the browser console, you'll get the error message Uncaught TypeError: Cannot read property 'slice' of undefined, as reported in issue #134

How Has This Been Tested?

Only manually.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Siteproxy
@JonShort
Copy link
Contributor

Good work 👍

@JonShort JonShort merged commit 89e080e into pushtell:master Sep 25, 2017
hashedhyphen pushed a commit to hashedhyphen/react-bootstrap-date-picker that referenced this pull request Jan 14, 2018
This fix is a cherry-pick of pushtell#137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants