Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove ui bootstrap datepicker footer angularjs

Tags:

Note : You can find answer in this article : Remove footer from angular ui bootstrap date picker

I am using ui-bootstrap datapicket for date of birth field. as below

<input type="text" data-datepicker-popup="dd-MMMM-yyyy" data-show-weeks="false" data-ng-model="model.dateOfBirth" id="dateOfbirth" name="dateOfBirth"> 

It is working fine. as shown below

enter image description here

So my question is how can i hide the footer of the date picker ??

Thanks in advance..

like image 289
Ranadheer Reddy Avatar asked Sep 26 '13 14:09

Ranadheer Reddy


2 Answers

You can do it globally, like the following:

myApp.config(function (datepickerConfig, datepickerPopupConfig) {     // datepickerConfig.showWeeks = false;     // datepickerPopupConfig.toggleWeeksText = null;     datepickerPopupConfig.showButtonBar = false; }); 

Or you can do it for a specific instance of date-picker, like the folling:

<input type="text" ng-model="dt" show-button-bar="false" /> 
like image 175
AlexG Avatar answered Sep 24 '22 01:09

AlexG


Looking for the same, I've found this answer:

Remove week column and button from Angular-ui bootstrap datepicker

So:

angular.module('app', ['ui.bootstrap'])   .config(function (datepickerConfig) {       datepickerPopupConfig.showButtonBar = false;     }); 
like image 36
adri14 Avatar answered Sep 25 '22 01:09

adri14