G
Guest
Hi there,
I have a problem with a calendar control. I put the following function in
the SelectionChanged event
public void DatePick(object sender, System.EventArgs e)
{
TxtDate.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
I open and close the calendar with this function:
public void ImageButton1_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
Calendar1.Visible = (Calendar1.Visible == false) ? (true) : (false);
}
The problem is if the user selects the same day which has been previously
selcted the Calendar will not disappear, because the selection has not
changed. How could I make the Calendar disappear when the user selects the
same day? Putting code in the Page.IsPostBack event does not do the trick..
Any sugestions are welcome. Thanks a lot
Chris
I have a problem with a calendar control. I put the following function in
the SelectionChanged event
public void DatePick(object sender, System.EventArgs e)
{
TxtDate.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
I open and close the calendar with this function:
public void ImageButton1_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
Calendar1.Visible = (Calendar1.Visible == false) ? (true) : (false);
}
The problem is if the user selects the same day which has been previously
selcted the Calendar will not disappear, because the selection has not
changed. How could I make the Calendar disappear when the user selects the
same day? Putting code in the Page.IsPostBack event does not do the trick..
Any sugestions are welcome. Thanks a lot
Chris