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

feat(datepicker): ng-model-options: allowInvalid support #5044

Closed
wants to merge 1 commit into from

Conversation

jbarrus
Copy link
Contributor

@jbarrus jbarrus commented Dec 9, 2015

Relevant issues - #4694, #4837

Somewhat based on davious@cba7a61 from @davious

@@ -605,6 +611,9 @@ function(scope, element, attrs, $compile, $parse, $document, $rootScope, $positi
datepickerEl = angular.element(popupEl.children()[0]);
datepickerEl.attr('template-url', datepickerTemplateUrl);

scope.ngModelOptions = { $options: angular.extend({ allowInvalid: false }, ngModelOptions) };
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any particular reason that this should be exposed on scope?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's necessary, I copied some of the code from @davious (forgot to mention that originally in the pull request) and he had it in there.

@jbarrus
Copy link
Contributor Author

jbarrus commented Dec 10, 2015

I see, thanks, ngModel.$options is definitely much simpler. Does this look right?

@wesleycho wesleycho added this to the 1.0.0 milestone Dec 10, 2015
@wesleycho
Copy link
Contributor

Oops...I messed up with my commit - this is now in as 2460e42

@wesleycho wesleycho closed this Dec 10, 2015
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