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:

clip_image001

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();

clip_image002

Leave a comment