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

[Solved] DatePicker does not support globalization

0 Answers 36 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Valdas
Top achievements
Rank 1
Valdas asked on 29 Mar 2012, 08:29 AM
Hi,
I have encountered an issue while globalizing application powered by Telerik Mvc Extensions. When I hover over DatePicker control it says "Open the calendar" wich I would like to change when there page is displayed in different culture. But it seems that at this moment the only way you can do it is through JS witch is not very nice. I have checked the code how picker is constructed and I found that is hardcoded like this:
public DatePicker(ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory) : base(viewContext, clientSideObjectWriterFactory)
{
    Action<IEffect> action = null;
    List<IEffect> list = new List<IEffect>();
    list.Add(new SlideAnimation());
    this.defaultEffects = list;
    base.ScriptFileNames.AddRange<string>(new string[] { "telerik.common.js", "telerik.calendar.js", "telerik.datepicker.js" });
    if (action == null)
    {
        action = delegate (IEffect el) {
            base.Effects.Container.Add(el);
        };
    }
    this.defaultEffects.Each<IEffect>(action);
    base.Format = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
    base.MinValue = defaultMinDate;
    base.MaxValue = defaultMaxDate;
    this.ButtonTitle = "Open the calendar";
    this.ShowButton = true;
}
Tags
Date/Time Pickers
Asked by
Valdas
Top achievements
Rank 1
Share this question
or