This is a migrated thread and some comments may be shown as answers.

Week numbers is wrong

2 Answers 182 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jan Mucha
Top achievements
Rank 1
Jan Mucha asked on 30 Jul 2010, 11:27 AM
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 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 03 Aug 2010, 02:52 PM
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
0
Jan Mucha
Top achievements
Rank 1
answered on 05 Aug 2010, 08:47 AM
Thanks , calendar working correct.
Tags
Calendar
Asked by
Jan Mucha
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Jan Mucha
Top achievements
Rank 1
Share this question
or