Calendar control: What is the current month being viewed?

Posted on 2005-04-21
Last Modified: 2010-04-07
I have a calendar control:
<asp:Calendar runat="server" OnDayRender="CalendarDayRender" id="cc" />

Is there a way I can determine what month is currently being viewed?  For example, if the user clicks the Next button and scrolls to the month of "May", how can I determine what month he/she is viewing (in this case, May)?
Question by:hendridm
    LVL 15

    Expert Comment

    LVL 8

    Author Comment

    I believe that value only changes if the user selects a date, correct?  When the control is first draw, or if the user scrolls through the months, the "SelectedDate" value is set to: 1/1/0001 12:00:00 AM
    LVL 6

    Expert Comment

    You can use - cc.SelectedDate.Month - try it in SelectionChanged event.
    LVL 15

    Expert Comment

    Calendar1.TodaysDate.Month that displayed the month on the calendar..since by def it shows month of taday's date..

    LVL 6

    Accepted Solution

    Try the event VisibleMonthChanged ()
    e.NewDate.Month should give the new month

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now