javascript - Strange bug with date input and angular -
i'm working on angular based app , have strange bug.. when use:
<input type="date" ng-model="date">
the $scope.date
has 1 day delay...
when try run attachment code prints date
have selected 1 day delay :(
can do?!
thank :)
var app = angular.module('app', []); app.controller('ctrl', ['$scope', function($scope){ }])
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <body ng-app="app"> <body ng-controller="ctrl"> <input type="date" ng-model="date"> {{ date }} </body> </body>
i think similar issue : jquery datepicker off 1 day
i have solved using momentjs library. provides lots of time-zone methods.
moment.utc([year, month, day])._d
Comments
Post a Comment