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

fix(datepicker): datepicker-popup compatibility with ngModelOptions #3494

Merged
merged 1 commit into from
Apr 6, 2015

Conversation

chrisirhc
Copy link
Contributor

Fixes #3349

if (isNaN(date)) {
return false;
} else {
return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified by just doing return !isNaN(date);

@wesleycho
Copy link
Contributor

Excepting my one comment, this LGTM.

- Separate validation from parsing so that validation still runs on model
  change
- Remove direct calls to $render
- Remove extra call to $render during intialization (only run when format is
  changed)
- Save last date value in formatter
- Remove use of ngModel.$modelValue as users may add parsers to convert
  $modelValue to other formats

Relates to angular-ui#2069

Fixes angular-ui#3349
@chrisirhc chrisirhc force-pushed the feature/datepicker-refactor branch from c7e20e6 to d024dd7 Compare April 6, 2015 04:10
@chrisirhc chrisirhc merged commit d024dd7 into angular-ui:master Apr 6, 2015
@chrisirhc chrisirhc deleted the feature/datepicker-refactor branch April 6, 2015 04:12
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.

Datepicker selection off by one selection for display from ngModel with ng-model-options
2 participants