angularjs - Multi same directive effect on one of them -
i wrote directive datepicker .i can't use twice in 1 form .
here code :
app.directive('datep', function() { return { restrict: 'a', require: 'ngmodel', link: function(scope, element, attr, ngmodel) { element.datepicker({ format: 'dd/mm/yyyy', autoclose: true }); } } });
your 2 inputs have same id. id supposed unique. give them different id.
Comments
Post a Comment