mayur singh

mayur singh

  • NA
  • 73
  • 4.8k

how to get triggered jqueryDatePicker

Apr 26 2016 8:06 AM
hello all i am stuck in a problem if any body has a solution please guide me on that.
basically i want to triggered event of jqueryDatePicker and get the selected date on clicking on any date.
I search but didn't get the solution.
below is my code
 
<div id="txtfuturedateWeekly" ng-model="employee.Date" jqdatepicker></div>
app.directive('jqdatepicker', function () {
return {
restrict: 'A',
require: 'ngModel',
link: function ($scope, $element) {
$element.datepicker({
dateFormat: 'DD, d MM, yy',
onSelect: function (date) {
$scope.date = date;
$scope.$apply();
}
});
}
};
});
 

and i want to call a below function to be fire when date is selected

 function lastDate(date) { var lDate = date  var myDate = new Date(lDate ); }


 
 

Answers (4)