daybook date issue

This commit is contained in:
venbatechnologies@gmail.com 2018-05-22 17:20:49 +05:30
parent 394822e95f
commit b9926dac02
2 changed files with 4 additions and 2 deletions

View File

@ -335,8 +335,10 @@ $scope.dayBookApprovalAccess = '';
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
} else {
$scope.disableAddButton = true;
var sdate= $('#datere').val();
var formate = "dd-MM-yyyy";
$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
$scope.myModelAdd.date= sdate;
//$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
$scope.myModelAdd.status = $scope.myModelAdd.name == 'I001' ? 'Pending' : 'Approved';
// $scope.data.push(myModelAdd);

View File

@ -315,7 +315,7 @@
Date <span
class="symbol required"></span>
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
<input type="text" id="datere" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
show-button-bar="true" max-date="todayDate" />