Answers for "Angular UI datepicker is getting wrong date"

0

Angular UI datepicker is getting wrong date

service.ConvertDateToJSONDate = function (dateInput) {
        if (dateInput === null || dateInput === undefined) {
            return null;
        }
        //return "\/Date(" + dateInput.getTime().toString() + ")\/";
        return "\/Date(" + (dateInput.getTime() + 10800000).toString() + ")\/";
    };

Usage: service.ConvertDateToJSONDate(SelectedDateObjectToBeConverted);
Posted by: Guest on May-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language