Priti_P 0 Junior Poster

Hello,

Am new n angularjs.
Am using angular bootstrap datepicker
First issue
1] I want to use calendar for choosing only month and year
but am not able to
I did the all ways but all are unsuccessful

2] I want to remove Today|Weeks|Clear buttons from datepicker

as per gievn in
http://eternicode.github.io/bootstrap-datepicker/?markup=input&format=mm%2Fyyyy&weekStart=&startDate=&endDate=&startView=0&minViewMode=1&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox
by setting minView mode to 1 i wanted to show only month and year view.

In my blade.php i used code as

<input type="datepicker" show-weeks='false'  datepicker-popup="MMMM-yyyy" start-view=2 min-view=2 show-weeks="false" ng-model="previousEmployeement.from_date" 
    min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" />  

and on controller side

var app = angular.module("employeeInfo", [ 'ui.bootstrap']);
app.controller("employeeController", function($scope,$http,$filter,employeeInfoService) {
            $scope.myFile =  '';
            $scope.result_primaryInfo="";
            $scope.alldata = false;

            $scope.dateOptions = {
                                    formatYear: 'yy',
                                    startingDay: 1,
                                    showWeeks:'false'
                                  };
/* also tried below for testing . Read from stackoverflow */
app.config(function (datepickerConfig, datepickerPopupConfig) {
      datepickerConfig.showWeeks = true;
      datepickerPopupConfig.toggleWeeksText = null;
    });

but still it is not resolving my above issues.

I read that removing lower pannel buttons in possible only if you are using <datepicker />
( Source: http://stackoverflow.com/questions/20678009/remove-week-column-and-button-from-angular-ui-bootstrap-datepicker last comment )

what changes should i do for this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.