How to have at least two datepickers of ui-bootstrap on a single page?

前端 未结 7 1950
青春惊慌失措
青春惊慌失措 2020-12-04 14:12

I want to have several datepickers on a page. But with the default solution from UI-Bootstrap it is not possible, no one of datepickers may be opened. The conflict with each

7条回答
  •  盖世英雄少女心
    2020-12-04 14:58

    Here is what worked for me: $id is scope id, provided by angular.

        ctrl.opened = {};
        ctrl.openDatatimePicker = function ($event, id) {
            $event.preventDefault();
            $event.stopPropagation();
            ctrl.opened[id] = true;
        }
                                                

提交回复
热议问题