Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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