Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Calendar Control Question

Reply
Thread Tools

Calendar Control Question

 
 
David Hamilton via .NET 247
Guest
Posts: n/a
 
      06-16-2004
I'm having trouble with the Calendar Class. I'm setting it'sselected date in the page_load event, which is being done. Thebut control doesn't then display the month corresponding to it'sselected date, rather it just displays the current monthinstead. If I surf the control to it's selected date the correctdate is always highlighted.

What do I have to do to show the correct month?
Thanks for your time

David

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>HVetX85jVEu+kt8OhFlUBw==</Id>
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-16-2004
Hi David,

Are you remembering to set the visibleDate?

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
If Not IsPostBack Then
Dim dtNow As Date = DateTime.Now
Calendar1.SelectedDate = dtNow
Calendar1.VisibleDate = dtNow
End If
End Sub

Ken
Microsoft MVP [ASP.NET]


"David Hamilton via .NET 247" <> wrote in message
news:...
I'm having trouble with the Calendar Class. I'm setting it's selected date
in the page_load event, which is being done. The but control doesn't then
display the month corresponding to it's selected date, rather it just
displays the current month instead. If I surf the control to it's selected
date the correct date is always highlighted.

What do I have to do to show the correct month?
Thanks for your time

David

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>HVetX85jVEu+kt8OhFlUBw==</Id>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar GadGets does not show calendar iccsi Windows 64bit 4 08-14-2011 01:52 PM
How to Synchronise Hotmail Calendar with Standard Outlook Calendar using Outlook Connector ?? Synapse Syndrome Computer Support 0 12-02-2007 04:19 AM
Thunderbird Calendar with Exchange 2003 Calendar and Public FoldersCalendar jincmcse Firefox 1 09-03-2005 02:46 AM
Calendar Control - Programatically set the calendar to a date range Shevek ASP .Net 3 06-23-2004 01:41 PM
Calendar Control - Programatically set the calendar to a date range Shevek ASP .Net Web Controls 0 06-23-2004 12:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57