How to set (or remove) timezone for AngularJs UI mix with jQuery Datepicker

165 views Asked by At

I have a input type Date, because my Project user Spring MVC + AngularJs, so i used Datepicker of AngularUI, but when value send into Request, timezone always auto minus 7 hours, i looking for all solution but not found anwser, please help me! This is link guide: https://github.com/angular-ui/ui-date. Edit: I from vietnam and GTM+7

var app = angular.module('listHistoryApp', ['ui.bootstrap', "ui.select2", 'ui.date']);
app.controller('historyCtrl', function ($scope, $http, $filter, $location) {
    $scope.dateOptions = {
        changeYear: true,
        changeMonth: true,
        dateFormat: "dd-mm-yy",
        yearRange: '1970:-0'
    };
};
<input ui-date="dateOptions" class="span2" type="text" ng-model="fromDate"/>

I expect the output when pick 27/6/2019 tobe 2019-06-27 or 2019-06-27T00:00:00.000Z, but the actual output is 2019-06-26T17:00:00.000Z.

0

There are 0 answers