If I have an html control in my page.
<input type="text" id="dateFrom" runat="server" ClientIDMode="Static"/>
On a button click, I save the value of input dateFrom
to a Sitecore item's field with type "DateTime
"
CodeBehind:
item["Visible From"] = dateFrom.Value;
I am using Jquery to show a calendar when user clicks inside the input dateFrom
$(function () {
$("#dateFrom").datepicker();
});
After saving the item, the result I see in the "Content Editor" is:
The correct date is some how not saving. I also tried with <asp:TextBox
instead of <input type="text"
but still same result.