Answer the question
In order to leave comments, you need to log in
How to solve problem with increasing hours in datetimepicker?
Good afternoon! I ran into an unknown error, the angular project picked up this plugin eonasdan.github.io/bootstrap-datetimepicker , wrote the directive:
app.directive('datetimepicker', function() {
return {
require: 'ngModel',
link: function (scope, element, attrs, ngModelCtrl) {
$(function() {
element.datetimepicker({
format: 'DD.MM.YYYY HH:mm',
locale: 'ru'
})
.on('dp.change', function(value){
ngModelCtrl.$setViewValue(value['date']);
scope.$apply();
if(value['date']){
element.removeClass('empty');
}
else{
element.addClass('empty');
}
});
});
}
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question