Week numbers is wrong

3 posts, 0 answers
  1. Jan Mucha
    Jan Mucha avatar
    25 posts
    Member since:
    Aug 2012

    Posted 30 Jul 2010 Link to this post

    Hello, I found the problem of the week numbers in calendar. Numbering is not correct. Current week number is 1 greater than the reality.
  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 03 Aug 2010 Link to this post

    Hi Jan,

    By default RadCalendar does not apply week numbers according to the ISO standard, because the ASP.NET framework itself does not do this.

    In order to make RadCalendar apply week numbers according to the ISO 8601 standard, please use the approach demonstrated below:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
        
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        
    <script runat="server">
            
        protected void Page_Load(object sender, EventArgs e)
        {
            System.Globalization.CultureInfo c = new System.Globalization.CultureInfo(RadCalendar1.CultureInfo.ToString());
            c.DateTimeFormat.CalendarWeekRule = System.Globalization.CalendarWeekRule.FirstFourDayWeek;
            RadCalendar1.CultureInfo = c;
        }
            
    </script>
        
    <head runat="server">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadControls for ASP.NET AJAX</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
    <telerik:RadCalendar ID="RadCalendar1" runat="server" FirstDayOfWeek="Monday" />
        
    </form>
    </body>
    </html>


    All the best,
    Tsvetina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jan Mucha
    Jan Mucha avatar
    25 posts
    Member since:
    Aug 2012

    Posted 05 Aug 2010 Link to this post

    Thanks , calendar working correct.
Back to Top