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

fix(datepicker): MinMaxInputValidation #3606

Conversation

stevecavanagh
Copy link

This PR is designed to fix #1688 and replaces my earlier PR #3020.
Enable min and max validation on datepicker popup input. Revised to only use one formatter and one parser per reviewer suggestions. Also, modified demo app to avoid scoping issues when binding to primitives. (See https://github.com/angular/angular.js/wiki/Understanding-Scopes)

if (isNaN(date1) || isNaN(date2)) {
return undefined;
}
else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move else one line up

shortcutPropagation: '&?'
shortcutPropagation: '&?',
minDate: '@',
maxDate: '@'
Copy link
Contributor

Choose a reason for hiding this comment

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

These new bindings should be optional

@wesleycho wesleycho modified the milestones: 0.14.3, 1.0.0 Oct 23, 2015
@wesleycho
Copy link
Contributor

Going to close this in favor of #4841 - the approach there seems more elegant.

@wesleycho wesleycho closed this Dec 14, 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.

Inline-Datepicker doesn't add ng-(in)?valid
3 participants