Got a chance to look at DNN’s DatePicker yesterday, seem like it quite easy to implement.
in ASCX,
<asp:TextBox ID=”txtStartDate” runat=”server” AutoPostBack=”true” Enabled=”False”></asp:TextBox>
<asp:Image ID=”imgStartDate” runat=”server” EnableViewState=”False” ImageUrl=”~/DesktopModules/BCU/images/date.gif” />
in CS,
string attrib = “”;attrib = DotNetNuke.Common.Utilities.Calendar.InvokePopupCal(txtStartDate);
this.imgStartDate.Attributes.Add(“onClick”, attrib);
But bear in mind, please use image instead of image button. When on click, the date value will automatic bind into textbox. [...]