我想使用一个按钮来显示和隐藏日期选择器.
http://mgcrea.github.io/angular-strap/##datepickers
没有关于如何做到这一点的文件
var app = angular.module('mgcrea.ngStrapDocs', ['ngAnimate', 'ngSanitize',
'mgcrea.ngStrap']);
app.controller('MainCtrl', function($scope) {
});
'use strict';
angular.module('mgcrea.ngStrapDocs')
.config(function($datepickerProvider) {
angular.extend($datepickerProvider.defaults, {
dateFormat: 'dd/MM/yyyy',
startWeek: 1,trigger:manual
});
})
.controller('DatepickerDemoCtrl', function($scope, $http,$datepicker) {
//ng-click
$scope.datepickerpop = function() {
$datepicker.show();
//$datepicker._show();
};
});
Run Code Online (Sandbox Code Playgroud)