I had Column "StartDate" with "Date and Time Format" DateOnly and "Display Format" Display.
And I am using JSOM with OTB to save information to SharePoint list. When I use oListItem.set_item('StartDate',TempStartDateValue)
I am getting error:
Request Failed. String was not recognized as a valid datetime
Can anyone help me to solve this?
var TempStartDateValue=document.getElementById("txtCertificationDate").value;
var clientContext = new SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle('TempSec2');
var itemCreateInfo = new SP.ListItemCreationInformation();
this.oListItem = oList.addItem(itemCreateInfo);
*oListItem.set_item('StartDate',TempStartDateValue);*
oListItem.update();