<div data-datetime data-date-format="yyyy-mm-dd hh:mm:ss" data-link-field="dtp_input1">
<input data-ng-model="ContactTime" name="contactTime" id="contactTime" class="form-control" size="16" type="text"> </div>
myApp.directive("datetime", function ($rootScope) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.click(function(){
element.datetimepicker({
dateFormat:'yyyy-mm-dd HH:mm:ss',
autoclose: 1,
todayHighlight: true,
showMeridian:1
});
});
}
};
});
Hi friends,Here is my div which displays date with the time with the help of angular directive.But Here the minute and seconds are not displaying properly.Did i do anything wrong in the datetime directive.
For example when i select the time 17-May-2014 2:35.It displaying as 17-May-2014 2:05. Minutes are always displaying 05.seconds also displaying wrongly.
I think the format is wrong.please help me.