-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Conversation
@@ -811,6 +813,9 @@ function(scope, element, attrs, $compile, $parse, $document, $rootScope, $positi | |||
|
|||
if (angular.isString(viewValue)) { | |||
var date = dateParser.parse(viewValue, dateFormat, scope.date); | |||
for(var i = 0; isNaN(date) && i < altInputFormats.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to move the isNaN check to inside the loop after the dateParser is run? That way one can just break
out of the loop if it is a valid date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I plan to move the isNaN(date)
to inside the loop.
_(Default: [])_: | ||
A list of alternate formats acceptable for manual entry. | ||
|
||
### Keyboard Support ###s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove that extra s
and lowercase that support
(not sure why you even touched that anyway).
Also the []
on the default needs to be between backsticks.
1760c8d
to
7369d16
Compare
- Adds support for multiple input formats Closes angular-ui#4951 Closes angular-ui#4952
fixes #4951