Hi ,
I have written a function using ECMASCRIPT to update a date only field with today's date (for SharePoint Online Portal)
Though the date value in variable is correct, when the item is created, it displays the date of previous day.
I also tried to convert the date based on site's regional settings but then 'undefined' error is thrown by the code.
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var dateToUpdate = new Date(myDate);
var newDate = web.get_regionalSettings().get_timeZone().localTimeToUTC(dateToUpdate.toISOString());
Can someone help me to figure this out ?
Thanks,
Nutan
Nutan Sharma