I'm using the datepair.js component, http://jonthornton.github.io/Datepair.js/ where the user can select a start time in one field and the second field is automatically filled in with the components js. I'm running into an issue where the field populated by js is not being submitted by angularjs. If I manually type in the characters, it's submits the field data perfectly. I'm wondering how to fix this.
Code
<form method="post">
<g:select class="form-control" required="true" name="requestType" ng-model="leaveRequest.requestType" from="${requestTypes}" optionKey="id" optionValue="name"/>
<p id="basicExample">
<input type="text" class="date start" required="true" ng-model="leaveRequest.startDate"/>
<input type="text" class="time start" required="true" ng-model="leaveRequest.startTime"/> to
<input type="text" class="time end" required="true" ng-model="leaveRequest.endTime"/>
<input type="text" class="date end" required="true" ng-model="leaveRequest.endDate"/>
</p>
<button ng:click="addEvent()">Add Event</button>
</form>
Javascript
$scope.events = [];
$scope.addEvent = function() {
$http.post('./calendar/save.json', $scope.leaveRequest)
.then(function(response) {
$scope.events.push(response.data);
}, function(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
};