Problems with setting texts in RadMonthYearPicker

2 posts, 0 answers
  1. Jenny
    Jenny avatar
    1 posts
    Member since:
    Mar 2016

    Posted 25 Mar 2016 Link to this post

    I would like to use the RadMonthYearPicker Component in an application with Swedish language. I need two Controls for letting the users to define a period. But I have a problem with setting the texts on the Today and Cancel buttons.

    I've tried changing the settings in MonthYearNavigationSettings in the Page_Load, but just the first call for each Component makes an impact on the result.

    For example:

    rmypFromDatum.MonthYearNavigationSettings.CancelButtonCaption = "Avbryt";
    rmypFromDatum.MonthYearNavigationSettings.TodayButtonCaption = "Idag";
    rmypTomDatum.MonthYearNavigationSettings.TodayButtonCaption = "Idag";
    rmypTomDatum.MonthYearNavigationSettings.CancelButtonCaption = "Avbryt";

    then in the first Component, rmypFromDatum, the text on the Cancel Button is changed to "Avbryt", but the text on the Today button is English - Today. And vice versa - on the second Component the Today button has the text changed to "Idag" but the Cancel button has the text "Cancel.

    When a button is clicked on the page and the page is reloaded both the buttons - Today and Cancel - get the Swedish texts.

    What shall I do to make my Changes to be visible the first time the users open the Components. Please help!

    Best regards,





  2. Eyup
    Eyup avatar
    3387 posts

    Posted 30 Mar 2016 Link to this post

    Hello Jenny,

    Try to apply these localization settings in an earlier stage of the page life cycle. For example:
    protected void rmypFromDatum_Init(object sender, EventArgs e)
        RadMonthYearPicker picker = sender as RadMonthYearPicker;
        picker.MonthYearNavigationSettings.CancelButtonCaption = "Avbryt";
        picker.MonthYearNavigationSettings.TodayButtonCaption = "Idag";
        picker.MonthYearNavigationSettings.OkButtonCaption = "Godta";

    I hope this will prove helpful.

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top