How Set Month to RadCalendar

8 posts, 0 answers
  1. Hrushikesh Mokashi
    Hrushikesh Mokashi avatar
    172 posts
    Member since:
    Dec 2007

    Posted 09 Jan 2009 Link to this post

    Hi All,

    I am using RadCalender.

    I have added 3 radcalender control.
    First calendar show the current month.
    I want to set second calendar to next month from current month
    and third calendar to net to next month from current month.

    From serveside how can i set the month.

    Thanks
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 09 Jan 2009 Link to this post

    Hi Hrushikesh,

    Please set the FocusedDate property to a date from the desired month.

    Regards,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nilima
    Nilima avatar
    4 posts
    Member since:
    Oct 2013

    Posted 16 Oct 2013 Link to this post

    Hi All,

    Can anybody know how to set current year months only in telerik calender control by server side or by client side.
    Please help me.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Oct 2013 Link to this post

    Hi Nilima,

    Please have a look into the following code I tried to display the months of the current year.

    ASPX:
    <telerik:RadCalendar ID="RadCalendar1" runat="server">
        <ClientEvents OnLoad="OnLoad" />
    </telerik:RadCalendar>

    JavaScript:
    <script type="text/javascript">
        function OnLoad(sender, args) {
            var currentYear = new Date().getFullYear();
            var mindateTriplet = new Array(currentYear, 1, 1);
            var maxdateTriplet = new Array(currentYear, 12, 31);
            sender.SetRangeMinDate(mindateTriplet);
            sender.SetRangeMaxDate(maxdateTriplet);
        }
    </script>

    CSS:
    <style type="text/css">
        .RadCalendarMonthView tr td:first-child + td + td, .RadCalendarMonthView tr td:first-child + td + td + td
        {
            display: none;
        }
    </style>

    Thanks,
    Shinu.
  6. Nilima
    Nilima avatar
    4 posts
    Member since:
    Oct 2013

    Posted 22 Oct 2013 Link to this post

    Hi Shinu,

    Thanks for the reply. Its working for me.
  7. Nilima
    Nilima avatar
    4 posts
    Member since:
    Oct 2013

    Posted 28 Oct 2013 Link to this post

    Hi All,

    Can anybody know, how to get Rad Calendar month start date and month end date on page load as well as on calendar month changed?
    Please help me.
  8. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Oct 2013 Link to this post

    Hi Nilima,

    Please have try the following JavaScript code which displays the Start Date and End Date of the RadCalendar.

    ASPX:
    <telerik:RadCalendar ID="RadCalendar1" ShowOtherMonthsDays="false" runat="server"
        ClientEvents-OnLoad="showDates" ClientEvents-OnCalendarViewChanged="showDates">
    </telerik:RadCalendar>

    JavaScript:
    <script type="text/javascript">
        function showDates(sender, args) {
            var monthstart = sender.CurrentViews[0]._MonthStartDate;
            var monthend = sender.CurrentViews[0]._MonthEndDate;
            var startDate = monthstart[2] + "/" + monthstart[1] + "/" + monthstart[0];
            var endDate = monthend[2] + "/" + monthend[1] + "/" + monthend[0];
            alert("Month Start Date : " + startDate);
            alert("Month End Date : " + endDate);
        }
    </script>

    Thanks,
    Princy.
  9. Nilima
    Nilima avatar
    4 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2013 Link to this post

    Thank you so much princy.


    Thanks,
    Nilima
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017