angular ui datepicker is getting wrong date

Solutions on MaxInterview for angular ui datepicker is getting wrong date by the best coders in the world

showing results for - "angular ui datepicker is getting wrong date"
Jakob
06 Jul 2016
1    service.ConvertDateToJSONDate = function (dateInput) {
2        if (dateInput === null || dateInput === undefined) {
3            return null;
4        }
5        //return "\/Date(" + dateInput.getTime().toString() + ")\/";
6        return "\/Date(" + (dateInput.getTime() + 10800000).toString() + ")\/";
7    };
8
9Usage: service.ConvertDateToJSONDate(SelectedDateObjectToBeConverted);