Is there a way to manipulate the datepicker object so it can open and close as needed? Also, how can I access the datepicker object in a different directive within AngularJS?
** HTML **
<input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup1.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" picker-date />
Directive:
module.directive('pickerDate', function() {
return {
restrict: 'A',
priority: 1,
require: 'ngModel',
link: function(scope, element, attrs, ctrl) {
console.log(ctrl)
element.on('click', function() {
});
// console.log();
}
};
});
How do I trigger a method of the datepicker when an element is clicked? Any assistance on this matter would be greatly appreciated. Thank you.