Angular event not working on jquery datepicker, am trying to use ng-change
event on jquery date picker, its not working when date changes.
jQuery
$('.datep').datepicker({
format: "yyyy-mm-dd",
autoclose: true,
}).on('changeDate', function (ev) {
$(this).datepicker('hide');
});
HTML
<input class="form-control datep" ng-change="fetchDateBetn()" name="edate" id="edate" type="text" value="">
Angular JS
$scope.fetchDateBetn=function(){
alert("working");
}
Try to use the angular bootstrap date picker,
<div style="display:inline-block; min-height:290px;">
<datepicker ng-change="fetchDateBetn()" ng-model="dt" min-date="minDate" show-weeks="true" class="well well-sm"></datepicker>
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.