In the edit form in sharepoint designer 2010 I want to use the Sharepoint😀ateTimeControl for my date fields. The problem is whenever I save the edit or insert form and leave these fields blank with this control in place it defaults to todays date. I want it to be an empty string or just left blank.
In my edit form, my date is blank.
But, if I save the form, and the date is blank, it takes today’s date.
If open my form in mode edition
this is my code in sharepoint designer edit form
But, in editform customized does not code c#
Done a bit of Googling – looks like this is a common problem. the only way around it is to test for empty date.
objdt = DBNull.Value;
objdt = dt.SelectedDate.ToString();