Md-datepicker timezone issue
I have a timezone problem with md-datepicker
.
I have this element:
HTML
:
<md-datepicker name="indate" md-placeholder="In Date" ng-model="fechain" ng-model-options="{ timezone: timezone }" md-min-date="fechain" md-max-date="fechain" required></md-datepicker>
And this is the view related part of the controller:
$scope.fechain = $scope.fechaminin = moment().toDate(); //Wed Jun 21 2017 21:10:59 GMT-0500 (-05)
$scope.timezone = moment().format('ZZ'); // "-0500"
But the datapicker shows June 22nd. I searched on Google but couldn't find any solution.
Any ideas?
+3
source to share
No one has answered this question yet
Check out similar questions: