We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this.maxDate and this.minDate need to be validated (null checking) before calling .getFullYear()
_dateChanged: function(date, oldValue) { if (!this._isValidDate(date)) { console.warn('Invalid date: ' + date); this.date = date = oldValue; } if (!this._withinValidRange(date)) { console.warn('Date outside of valid range: ' + date); if(date.getFullYear() == **this.maxDate**.getFullYear()) { this.date = this.maxDate; } else if(date.getFullYear() == **this.minDate**.getFullYear()){ this.date = this.minDate; } else { this.date = date = oldValue; } } ...
The text was updated successfully, but these errors were encountered:
The root of the issue is not validating that a property defined as a Date is actually a date and not currently set to null (or any non-date value for that matter), this type of issue can be found in these locations: https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-calendar.html#L245 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-calendar.html#L323 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-calendar.html#L552 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-calendar.html#L660 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-calendar.html#L689 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-calendar.html#L704 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-year-list.html#L147 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-year-list.html#L169 https://github.com/bendavis78/paper-date-picker/blob/2.0.0-rc2/paper-date-picker.html#L283
Sorry, something went wrong.
No branches or pull requests
this.maxDate and this.minDate need to be validated (null checking) before calling .getFullYear()
The text was updated successfully, but these errors were encountered: