Results 1 to 2 of 2

Thread: [resolved] Calendar1.SelectedMonth ??

  1. #1

    Thread Starter
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Question [resolved] Calendar1.SelectedMonth ??

    The calendar control has a SelectedDate property, but why isn't there a SelectedMonth property? I want the calendar to display the month of the selected date, not this month.

    Try this,... Drop a Calendar control on a WebForm, and in the Page_Load, but this line of code:
    VB Code:
    1. Calendar1.SelectedDate = Now.AddDays(45)
    Now when you run the project, the page loads and displays the current month, but the selected date is next month!

    Anyone have any ideas?
    Last edited by MrGTI; Oct 5th, 2005 at 10:28 AM. Reason: resolved
    ~Peter


  2. #2

    Thread Starter
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Thumbs up Re: Calendar1.SelectedMonth ??

    I managed to figure it out,... or at least i solved the problem.
    VB Code:
    1. 'Gives the control a selected date of 45 days from today
    2.         Calendar1.SelectedDate = Now.AddDays(45)
    3.  
    4.         'Makes the control display the same month as the selected date
    5.         Calendar1.TodaysDate = Calendar1.SelectedDate
    ~Peter


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width