SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to modify this codeplex solution Right now the custom field defaults to the date when we add the column to the list when we open the new form.aspx. I want to deafult to todays date when newform.aspx is opened.

Thanks, Has.

share|improve this question
It is worth mentioning that the codeplex project mentioned is a custom SharePoint field control. – SPDoctor Jan 27 '13 at 9:42

datetimebyminute uses sharepoint standard DataTimeControl. DateTimeControl has property named SelectedDate. Below is a code to set current date in this Control

dtControl.SelectedDate = DateTime.Today.Date;
share|improve this answer

Refer the below code for SharePoint DateTime field:

DateTime Control:

<sharepoint:datetimecontrol ID="dtDateTime" runat="server" IsValid="true" IsRequiredField="true" ></sharepoint:datetimecontrol>

c# code:

dtDateTime.SelectedDate = System.DateTime.Now
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.