Heres the issue, Im using the Calendar popup control in the gridview Item Template, when i go to select a date it puts in 1/1/0001 as the date.
Code for the Gridview template , the textbox is binding to object datasource.
Am i missing something in the calendar1_selectionChange ?
protected void Calendar1_SelectionChanged(object sender, EventArgs e){
PopupControlExtender.GetCurrent(this.Page).Commit(Calendar1.SelectedDate.ToShortDateString());
}
<asp:TemplateField HeaderText="est. Close Date" SortExpression="estimatedclosedate">
<ItemTemplate>
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="tbEstCloseDate" runat="server" Text='<%# Bind("estimatedclosedate","{0:d}") %>'
Width="65px" Font-Names="Verdana" BackColor="White" Font-Size="Smaller"></asp:TextBox>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<center>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Width="160px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" Font-Size="7pt" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
<atlasToolKit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolKit:PopupControlProperties TargetControlID="tbEstCloseDate" PopupControlID="Panel1"
Position="Bottom" />
</atlasToolKit:PopupControlExtender>
</asp:Panel>
</ContentTemplate>
</atlas:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>