Skip to main content

How to: Modify the Today Caption in the DateNavigator control

To change the Date Navigator‘s Today and Clear button captions, you can use the Localizer approach.

To accomplish this, implement MyDateNavigatorLocalizer class which inherits from the Localizer class and override its Localizer.GetLocalizedString method to return a proper text.

Set the static Localizer.Active property to utilize the MyDateNavigatorLocalizer class. This property should be set before initializing any other control, that is before the InitializeComponent() call.

View Example

        DevExpress.XtraScheduler.Localization.SchedulerLocalizer.Active = new MySchedulerLocalizer();
        DevExpress.XtraEditors.Controls.Localizer.Active = new MyDateNavigatorLocalizer();
public class MyDateNavigatorLocalizer : DevExpress.XtraEditors.Controls.Localizer {
    public override string GetLocalizedString(DevExpress.XtraEditors.Controls.StringId id) {
        if (id == DevExpress.XtraEditors.Controls.StringId.DateEditToday)
            return "Heute";
        if (id == DevExpress.XtraEditors.Controls.StringId.DateEditClear)
            return "Löschen";
        return base.GetLocalizedString(id);
See Also