I'll quickly say I'm new some what new to .Net, so any reading on the subject I'm happy to do.
All I'm trying to do is a simple control using the calendar and a text box. When a date is selected from the calendar, populate the text box. For some reason, I'm not getting anything back at all.
Code: C#
public partial class ShippingDateSelection : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void select_CalendarDate(object sender, EventArgs e)
{
DateTime selectedShipDate = Calendar1.SelectedDate;
txtSelectedDate.Text = selectedShipDate.ToLongDateString();
}
}
Code: HTML/ASPX
<eo:Calendar runat="server" id="Calendar1" DayCellWidth="21" DayHeaderFormat="FirstLetter"
DayCellHeight="16" GridLineFrameVisible="False" TitleLeftArrowHtml="&lt;" TitleFormat="MMM yyyy"
TitleRightArrowHtml="&gt;" GridLineColor="207, 217, 227" GridLineVisible="True"
OnSelectionChanged="select_CalendarDate">
<DayStyle CssText="border-right: #eaeaea 1px solid; border-top: #eaeaea 1px solid; border-left: #eaeaea 1px solid; border-bottom: #eaeaea 1px solid; background-color: #eaeaea"></DayStyle>
<SelectedDayStyle CssText="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid; background-color: white"></SelectedDayStyle>
<TitleStyle CssText="padding-right: 3px; padding-left: 3px; font-weight: bold; padding-bottom: 3px; color: white; padding-top: 3px; border-bottom: #cfd9e3 1px solid; background-color: #006699; font-size: 11px; font-family: verdana;"></TitleStyle>
<CalendarStyle CssText="border-right: #cfd9e3 1px solid; border-top: #cfd9e3 1px solid; font-size: 11px; border-left: #cfd9e3 1px solid; cursor: hand; border-bottom: #cfd9e3 1px solid; font-family: verdana; background-color: #eaeaea"></CalendarStyle>
<DayHoverStyle CssText="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid; background-color: white"></DayHoverStyle>
<MonthStyle CssText="font-size: 11px; font-family: verdana;"></MonthStyle>
<DayHeaderStyle CssText="height: 17px"></DayHeaderStyle>
</eo:Calendar>
<asp:TextBox ID="txtSelectedDate" runat="server" />