i'm having a problem while binding bootstrap datetimepicker to my model in angular. Initially everything works fine, the problem is that when i select a date and time using the control, then the model never is updated. However if i set the date input manually then the binding works too. This is my angular Controller:
routerApp.controller('CalendarCtrl',function($scope){
$scope.dateValue = "01/01/2000 12:00";
$('.form_datetime').datetimepicker({
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
forceParse: 0,
showMeridian: 1
});
});
And this is my datetimepicker control:
<form action="" class="form-horizontal" role="form">
<fieldset>
<legend>Test</legend>
<div class="form-group">
<label for="dtp_input1" class="col-md-2 control-label">DateTime Picking</label>
<div class="input-group date form_datetime col-md-5" data-date="1979-09-16T05:25:07Z" data-date-format="dd/mm/yyyy hh:ii" data-link-field="dtp_input1">
<input class="form-control" size="16" type="text" data-ng-model="dateValue">
<span class="input-group-addon"><span class="glyphicon glyphicon-remove" ></span></span>
<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
</div>
<input type="hidden" id="dtp_input1" value="" /><br/>
</div>
Date: {{dateValue}}
</fieldset>
</form>
Any idea? Thanks in advance!!