Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(datePicker): Don't parse without date format #2691

Closed
wants to merge 1 commit into from
Closed

fix(datePicker): Don't parse without date format #2691

wants to merge 1 commit into from

Conversation

oliversalzburg
Copy link
Contributor

Under certain conditions, parseDate() is invoked before dateFormat is set.
This will cause an error to be thrown.

Under certain conditions, parseDate() is invoked before dateFormat is set.
This will cause an error to be thrown.
@@ -509,6 +509,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
ngModel.$setValidity('date', true);
return viewValue;
} else if (angular.isString(viewValue)) {
if (!dateFormat) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should initialize var dateFormat = datepickerPopupConfig.datepickerPopup instead.

@karianna
Copy link
Contributor

karianna commented Mar 5, 2015

@oliversalzburg See @RobJacobs comments + this no longer merges.

@oliversalzburg
Copy link
Contributor Author

Shocking, given that I wrote the patch half a year ago :p

It's a 1-line change. I'm sure @RobJacobs can manage to put his suggestion into the code himself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants