Open chinmay235 opened 7 years ago
I got one solution for getting accurate date. Here is my code:
<input type="datetime" class="form-control" name="due_date" date-time view="date" format="YYYY-MM-DD" auto-close="true" min-view="date" ng-model="formData.due_date" readonly="" required="" date-change="changeDueDate" />
$scope.changeDueDate = function (modelName, newDate) {
console.log(modelName + ' has had a date change. New value is ' + newDate.format());
$scope.formData.due_date = newDate.format();
}
I have faced datepicker issue can you please see https://angularjscript.github.io/angularjs-datepicker/chinu.html link. When I am selecting any date I am getting previous date from the input date. I select
2017-02-15
I am getting"due_date": "2017-02-14T19:00:00.000Z"
in my controller.Thanks @chinmay235