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       });     }   } });   

demo

your 2 inputs have same id. id supposed unique. give them different id.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -