Completed
Last Updated: 21 May 2020 13:19 by ADMIN
Release R2 2020
Petr
Created on: 02 Apr 2020 16:23
Category: Scheduler
Type: Bug Report
1
Culture not respected when creating ColumnHeaderDate for the week in YearView
1 comment
ADMIN
Peter Milchev
Posted on: 02 Apr 2020 16:32

A temporary workaround can be found in the attached project: 

protected void Page_Load(object sender, EventArgs e)
{
    var dates = new Dictionary<string, string>();
    for (int i = 0; i < 7; i++)
    {
        var date = new DateTime().AddDays(i);
        var englishDate = date.ToString(RadScheduler1.YearView.ColumnHeaderDateFormat);
        var correctDate = date.ToString(RadScheduler1.YearView.ColumnHeaderDateFormat, RadScheduler1.Culture);
        dates.Add(englishDate, correctDate);
    }

    var serializer = new AdvancedJavaScriptSerializer();
    HiddenFieldDates.Value = serializer.Serialize(dates);

}
<asp:HiddenField ID="HiddenFieldDates" runat="server" />
<telerik:RadCodeBlock runat="server">
    <script>
        function pageLoadHandler() {
            var dates = JSON.parse($get("<%=     HiddenFieldDates.ClientID %>").value);

            $telerik.$(".rsYearMonthWrap tr:nth-of-type(2) th").each(function (ind, item) {
                $telerik.$(this).text(dates[$telerik.$(this).text()]);
            })
            // Sys.Application.remove_load(pageLoadHandler);  
        }
        Sys.Application.add_load(pageLoadHandler);
    </script>
</telerik:RadCodeBlock>

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Attached Files: