Class SuperDatePickerI18n

  • All Implemented Interfaces:
    Serializable, HasLocale

    public final class SuperDatePickerI18n
    extends com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
    implements HasLocale
    A locale-powered DatePicker.DatePickerI18n.
    Since:
    2020-04-09
    Author:
    miki
    See Also:
    Serialized Form
    • Constructor Detail

      • SuperDatePickerI18n

        public SuperDatePickerI18n()
        Creates the i18n data based on default Locale.
      • SuperDatePickerI18n

        public SuperDatePickerI18n​(Locale locale)
        Creates the i18n data based on given Locale.
        Parameters:
        locale - Locale to use.
    • Method Detail

      • setDisplayMonthNames

        public com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n setDisplayMonthNames​(List<String> displayMonthNames)
        Controls the month names used for displaying and typing in by the user.
        Parameters:
        displayMonthNames - Names of months. If empty or null, DatePicker.DatePickerI18n.getMonthNames() will be used.
        Returns:
        This.
      • getDisplayMonthNames

        public List<String> getDisplayMonthNames()
        Returns current month names for displaying as user formatted month name.
        Returns:
        A list of 12 month names (from January to December).
      • setLocale

        public void setLocale​(Locale locale)
        Description copied from interface: HasLocale
        Sets new locale for this object.
        Specified by:
        setLocale in interface HasLocale
        Parameters:
        locale - Locale to use. Should not be null.
      • getLocale

        public Locale getLocale()
        Description copied from interface: HasLocale
        Returns locale associated with this object.
        Specified by:
        getLocale in interface HasLocale
        Returns:
        A Locale. Never null.
      • setDateFormat

        public com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n setDateFormat​(String dateFormat)
        Overrides:
        setDateFormat in class com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
      • setDateFormats

        public com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n setDateFormats​(String primaryFormat,
                                                                                             String... additionalParsingFormats)
        Overrides:
        setDateFormats in class com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n