Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calendar Server Control
Message
 
À
04/09/2002 14:07:42
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00696706
Message ID:
00696808
Vues:
15
Jim,

You need to set the VisibleDate property of the Calendar as well as the SelectedDate property.

>Hi Cathi,
>
> Thanks for pointing that out... I changed the code and it still doesn't work. What I have now is below...
>
>MyCalendar.SelectedDate = Convert.ToDateTime(MyCalendar.VisibleDate.Month.ToString() + "/" + MyCalendar.VisibleDate.Day.ToString() + "/" + cboYear.Items(cboYear.SelectedIndex).ToString())
>
>>Real quickly looking at this code, I see that you are getting the reference to the SelectedIndex of the cboMonth combobox. Shouldn't this be from the SelectedIndex of the cboYear combobox?
>>
>>>Hello,
>>>
>>> I have created a ASPX page with a calendar control on it. I added to the page two combo boxes, one for the year and one for the month. I did this because I didn't find a way to have the user select the year or month without clicking a bunch of times. Anyway, I am having trouble finding a way to change the year of the calendar. The code from the year combo box is below. The selected value is 2002 all the time for some reason.
>>>
>>>What's wrong with the code below? Is there a better way accomplish this?
>>>
>>>MyCalendar.SelectedDate = Convert.ToDateTime(MyCalendar.VisibleDate.Month.ToString() + "/" + MyCalendar.VisibleDate.Day.ToString() + "/" + cboYear.Items(cboMonth.SelectedIndex).ToString())
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform