Created
March 13, 2015 21:39
-
-
Save menacestudio/782e9df7b4156a0b9aeb to your computer and use it in GitHub Desktop.
An AngularJS decorator directive to apply automatic formatting to Angular UI datepickers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function datepickerPopup() { | |
return <ng.IDirective>{ | |
restrict: 'EAC', | |
require: 'ngModel', | |
link: function ($scope, $element, $attrs, controller) { | |
controller.$formatters.shift(); | |
} | |
} | |
} | |
angular.module('app').directive('datepickerPopup', datepickerPopup); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment