Closed adirizky54 closed 11 months ago
In the demo for the ng-model it's the current date-time:
$scope.date = new Date();
For your case, use something like this:
$scope.date = moment().startOf('day');
Thanks its work, but if i change date. The result is same as before
Ok this seems to be an issue then: https://github.com/logbon72/angular-material-datetimepicker/blob/master/js/angular-material-datetimepicker.js#L142
I think we should add:
if (scope.time) {
scope.currentDate = moment(scope.currentDate, scope.format);
} else {
scope.currentDate = moment(scope.currentDate, scope.format).startOf('day');
}
@adirizky31 are you using the mdcDateTimeDialog? I've played with the demo, when the time is set before. It will not move after, when there is no clock picker at least.
When i'm input 12/12/2016 the value from that input was "2016-12-12T05:23:00:000Z" Sorry, bad english