Datepicker not opening twice in angular-ui version 0.11.0

前端 未结 11 1683
一向
一向 2020-12-28 12:43

I am trying to have 2 datepickers and I am using Angular UI version 0.11.0.

My HTML code


     

        
11条回答
  •  天命终不由人
    2020-12-28 12:57

    Here is the explanation about this behaviour

    AngularJS MTV Meetup: Best Practices (2012/12/11)

    https://www.youtube.com/watch?feature=player_detailpage&v=ZhfUv0spHCY#t=1870

    you can write it like this.

     
    

    In controller:

    $scope.date_picker1 ={
        date: new Date(),
        opened: false;
     };
     $scope.open = function($event) {
         .....
         $scope.date_picker1.opened = true;
     };
    

提交回复
热议问题