On the "SelectedIndexChanged" event of the combo box make the Calendar visible.
On page load give the following:
caCalendar.Visible = false;
then in the SelectedIndexChanged Event of the combo box give the following:
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
caCalendar.Visible = true;
}
the above code is in c#. make sure that all the controls are "runat=server"
On page load give the following:
caCalendar.Visible = false
private sub DropDownList1_SelectedIndexChangedByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboWeights.SelectedIndexChanged
caCalendar.Visible = true
End sub
gud u have got the codes in VB. but if you want to hide the control on "SelectionChanged" event of the calendar control, check whether the control also becomes hidden if u try to navigate between the months.
If it is so , u have to make the calendar visible in the "VisibleMonthChanged" event of the calendar control.
It wud work pretty fine with this.
What i meant was, add an item like "Select Calendar" in your DropDownList. Also have your Calendar hidden initially on your form/page. Then write the code so that when the user selects this choice "Select Calendar" in your DropDownList, display the Calendar.
.Net is gr8 man. It is such a wonderful language. I started loving the lang very much, I will miss it a lot if I am asked to work on some other platform in my next project.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.