I have a datepicker on my ASP.NET C# web form and I want to save this value to MS Access database. But when I press a button to save it, I get the error: “The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.”
Could someone help me? Thanks
My date picker:
$(function() {
$("#datepicker").datepicker({
beforeShowDay: $.datepicker.noWeekends,
minDate: 0,
maxDate: "+2M",
dateFormat: 'dd/mm/yy'
});
});
<input type="text" id="datepicker" readonly="readonly" />
Code behind:
AccessDataSource2.Insert();
AccessDataSource2.DataBind();
The correct format of using asp.net with jquery ui is this: