DropDownList with calendar

ednayap

Active member
Joined
Jun 18, 2003
Messages
29
Location
KL
hie all!

anyone can help me with this thing?
i want it to work as in when users click the dropdownbox and the calender appears...

tanx a lot
 
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"

Amicalement,
Neutrino
 
erm...im not too sure what is it called...but it displays a calendar
and tanx neotrino....but do you have codes in vb?

coz im developing using it!
:D
 
Code:
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
 
Hey buddy,

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.

Amicalement,
Neutrino
 
No . I dont suppose. The Calendar control is very much available in the ToolBox --> Web Controls.

Amicalement,
Neutrino
 
ermm....okay...
but i still dont get the idea on how i can put a calendar into a dropdownlist...

tanx for being patient =D
 
hmm buddy i think u got confused with that one.

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.

Hope u got things rt now.

Amicalement,
Neutrino
 
I am not gr8 pal.

.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.

Carry on the good work . :-)

Amicalement,
Neutrino
 
Back
Top