How to display Only the current month in the Event calander

Last post 05-08-2008 5:27 AM by amirmuthu. 5 replies.

Sort Posts:

  • How to display Only the current month in the Event calander

    01-23-2008, 11:31 PM
    • Loading...
    • tharakatk
    • Joined on 06-22-2006, 8:19 AM
    • Posts 2

    I need to know how to display only the current month days by avoiding other months days. Is it possible to do it in the event calander????

  • Re: How to display Only the current month in the Event calander

    01-24-2008, 1:40 AM

    if you want to show current date when you open calender then set

    cal.value=current date

     

  • Re: How to display Only the current month in the Event calander

    01-24-2008, 2:39 AM
    • Loading...
    • tharakatk
    • Joined on 06-22-2006, 8:19 AM
    • Posts 2

    No.. my requirement is to display days belongs to a perticular month by avoiding others months days

    Eg; for january, in calander  i dont want to display December last week at the begining and the February first week at the end...

  • Re: How to display Only the current month in the Event calander

    01-31-2008, 1:57 AM
    • Loading...
    • SevenUX
    • Joined on 04-30-2007, 4:07 PM
    • Posts 18

    If I understand you correctly, I'm not sure how to do it programatically however you could leverage the CSS to "hide" the "other" month.  I've edited my CSS file so much that I no longer know what the default is however, open the .css file and find the .calothermonth and set the visibility to hidden.  If you add a TD to it this will hide all contents in the table cell.

     

    /* OTHER MONTH */

    TD.calothermonth {

    visibility: hidden;

    }

    Timmy a 'User Experience' (UX) Consultant
    www.SevenUX.com
  • Re: How to display Only the current month in the Event calander

    01-31-2008, 1:58 AM
    • Loading...
    • SevenUX
    • Joined on 04-30-2007, 4:07 PM
    • Posts 18

    OK, um... where do you add the cal.value=current date????  Can you please elaborate?

    Timmy a 'User Experience' (UX) Consultant
    www.SevenUX.com
  • Re: How to display Only the current month in the Event calander

    05-08-2008, 5:27 AM
    • Loading...
    • amirmuthu
    • Joined on 03-26-2007, 9:56 AM
    • India
    • Posts 56

    Use the following code

            <asp:Calendar id="Calendar1" runat="server" Font-Size="10pt" BorderColor="White" BackColor="White"
                                                Width="216px" ForeColor="Black" Font-Names="Verdana" Height="188px" BorderWidth="1px" NextPrevFormat="ShortMonth">
                                                <SelectedDayStyle ForeColor="White" BackColor="#CCCCCC"></SelectedDayStyle>
                                                <OtherMonthDayStyle ForeColor="White"></OtherMonthDayStyle>
                                                <NextPrevStyle Font-Size="8pt" Font-Bold="True" ForeColor="#333333" VerticalAlign="Bottom"></NextPrevStyle>
                                                <DayHeaderStyle Font-Size="8pt" Font-Bold="True"></DayHeaderStyle>
                                                <TitleStyle Font-Size="10pt" Font-Bold="True" BorderWidth="4px" ForeColor="#333399" BorderColor="Black"
                                                    BackColor="White"></TitleStyle>
                                            </asp:Calendar>

    Regards,
    MuthuKrishnan Gurusamy
Page 1 of 1 (6 items)
Microsoft Communities
Page view counter