i have a question relating the RadCalendar control.
for an application i am developing we needed to display Week numbers.
so after switching on Row headers in RadCalendar, we found out that the numbering does not correspond with our previous controls.
Is there a way to alter the numbering of weeks?
changing culture did not have (any) desired effect.
i have included a picture displaying the differences.
on a side note: in telerik weeks go almost always to 53(sometimes to 54) and always start at 2 unless the year starts on a monday.
thanks in advance and with kind regards!
4 Answers, 1 is accepted
Thank you for writing.
Our RadCalendar uses the standard CalendarWeekRule to determine the first week of the year. By default its value is FirstDay. It is possible to change it as follows in order to customize the week number calculation:
I hope this information helps. Should you have further questions, I would be glad to help.
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
Thanks for the reply, it has pointed me in the right direction.
but even after adding your suggested change i keep having week numbering issues.
the numbers just don't match with the desired effect.
i have added a picture for a clearer explanation.
thanks in advance for your time!
with kind regards,
Thank you for getting back to me.
I have made several tests. However, when the CultureInfo.DateTimeFormat.CalendarWeekRule is FirstDay, it indicates that the first week of the year starts on the first day of the year and ends before the following designated first day of the week. As a result 01/01/2014 should be displayed as week 1 and 31/12/2013 as week 53.
I confirm that it is an issue with our RadCalendar's week numbering. I have logged it in our Feedback Portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - Feedback Item.
I have also updated your Telerik points.
Currently, due to the specificity of the RadCalendar, the suitable workaround that I can suggest is to use the ViewChanged event as follows:
Please do not hesitate to contact us if you have any additional questions.
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.