Angular Ui bootsrap datepicker not working

781 views Asked by At

i've a card view of a doctor with button "book appointment" button which pops up a datepicker.

i've been trying to apply angular ui bootstrap datepicker but its not working.

however I was able to apply

<datepicker min="minDate" show-weeks="false"></datepicker>

I have checked other questions in stackoverflow about the same issue but nothing seems to work. my doubt is that i am not using the correct bootstrap js or angular js.

EDIT : Updated plunker . I m not getting the drop down bootstrap datepicker.

http://plnkr.co/edit/uvYFVx?p=preview

1

There are 1 answers

1
Prayag Verma On BEST ANSWER

Change the open method inside Modal Controller to

$scope.open = function($event) {
    $event.preventDefault();
    $event.stopPropagation();
    $scope.opened = true;
};

Also include the dateOptions object in your Modal controller or define the init-date attribute on input element

$scope.dateOptions = {
    formatYear: 'yy',
    startingDay: 1
};

See the working example here http://plnkr.co/edit/Ju3ShB?p=preview