Datepicker show different week day name than Calendar component

Hi Team,

The DatePicker component show different week day names than Calendar component:

The day names for Calendar can be specified with ‘calendar.xxxx’ properties.
How to specify day names for Datepicker?



DatePicker takes short day names from LocaleService. To change short day names you should override it and provide your names.

  1. Override service:
import com.vaadin.server.LocaleService;
import com.vaadin.shared.ui.ui.UIState;
import com.vaadin.ui.UI;

import java.util.Locale;

public class CustomLocaleService extends LocaleService {

    public CustomLocaleService(UI ui, UIState.LocaleServiceState state) {
        super(ui, state);

    protected UIState.LocaleData createLocaleData(Locale locale) {
        UIState.LocaleData localeData = super.createLocaleData(locale);
        if ("zh-CN".equals(locale.toLanguageTag())) {
            localeData.shortDayNames = new String[]{ "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"};
        return localeData;
  1. Override AppUI to provide custom service:
public class CustomAppUI extends AppUI {
    private LocaleService customLocaleService =
            new CustomLocaleService(this, getState(false).localeServiceState);

    public static CustomAppUI getCurrent() {
        return (CustomAppUI) AppUI.getCurrent();

    public LocaleService getLocaleService() {
        return customLocaleService;
  1. In Spring configuration add:
public AppUI appUI() {
    return new CustomAppUI();

And exclude AppUI bean in the