Skip to content
April 15, 2009 / red1s

Quick Tip – Adding a Date Control Picker to a webpart

In order to add a date control to a webpart you need to add the Microsoft.sharepoint.portal reference to your project:


This will then allow you to add the following:

using Microsoft.SharePoint.WebControls;

And then add the control to your class:

private DateTimeControl txtAudit_Date;

txtAudit_Date = new DateTimeControl();



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: