-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(datepicker): support HTML5 input types #3499
feat(datepicker): support HTML5 input types #3499
Conversation
|
||
// Inner change | ||
scope.dateSelection = function(dt) { | ||
if (angular.isDefined(dt)) { | ||
scope.date = dt; | ||
} | ||
if (dateFormat) { |
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.
Does removing this not break anything?
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.
Hm.. Good point, the directive should throw an Error immediately if dateFormat
is falsey. It's undefined behavior and definitely an error in the use of this directive.
As above the dateFormat
would always fall back to datepickerPopupConfig.datepickerPopup
. However, if datepickerPopupConfig.datepickerPopup
is somehow overridden to a falsey value, this method should fail immediately. There should be no reason to leave the date format unspecified.
3b2d158
to
736d464
Compare
736d464
to
192688d
Compare
Closed by accident, reverted my commit. |
LGTM |
Can't be merged... |
Just needs to be rebased, should be easy. |
192688d
to
f31d747
Compare
f31d747
to
8a05268
Compare
Rebased. Note that I didn't add support for the weeks input type. Leaving that out for now unless there's a demand for it since we don't currently have a week picker. |
Fixes #3312
Demo of this:
http://plnkr.co/edit/eBtCPhNa7S1MnPbUY70a?p=preview