Class DateTimePicker.DateTimePickerI18n

java.lang.Object
com.vaadin.flow.component.datetimepicker.DateTimePicker.DateTimePickerI18n
All Implemented Interfaces:
Serializable
Enclosing class:
DateTimePicker

public static class DateTimePicker.DateTimePickerI18n extends Object implements Serializable
The internationalization properties for DateTimePicker.
See Also:
  • Constructor Details

    • DateTimePickerI18n

      public DateTimePickerI18n()
  • Method Details

    • getDateLabel

      public String getDateLabel()
      Gets the aria-label suffix for the date picker.

      The date picker's final aria-label is a concatenation of the DateTimePicker's DateTimePicker.getAriaLabel() or DateTimePicker.getLabel() methods and this suffix.

      Returns:
      the value used as a suffix in the date picker aria-label.
    • setDateLabel

      public DateTimePicker.DateTimePickerI18n setDateLabel(String dateLabel)
      Sets the aria-label suffix for the date picker.

      The date picker's final aria-label is a concatenation of the DateTimePicker's DateTimePicker.getAriaLabel() or DateTimePicker.getLabel() methods and this suffix.

      Parameters:
      dateLabel - the value to be used as a suffix in the date picker aria-label.
      Returns:
      this instance for method chaining
    • getTimeLabel

      public String getTimeLabel()
      Gets the aria-label suffix for the time picker.

      The time picker's aria-label is a concatenation of the DateTimePicker's DateTimePicker.getAriaLabel() or DateTimePicker.getLabel() methods and this suffix.

      Returns:
      the value used as a suffix in the time picker aria-label.
    • setTimeLabel

      public DateTimePicker.DateTimePickerI18n setTimeLabel(String timeLabel)
      Sets the aria-label suffix for the time picker.

      The time picker's aria-label is a concatenation of the DateTimePicker's DateTimePicker.getAriaLabel() or DateTimePicker.getLabel() methods and this suffix.

      Parameters:
      timeLabel - the value to be used as a suffix in the time picker aria-label.
      Returns:
      this instance for method chaining
    • getBadInputErrorMessage

      public String getBadInputErrorMessage()
      Gets the error message displayed when the field contains user input that the server is unable to convert to type LocalDateTime.
      Returns:
      the error message or null if not set
    • setBadInputErrorMessage

      public DateTimePicker.DateTimePickerI18n setBadInputErrorMessage(String errorMessage)
      Sets the error message to display when the field contains user input that the server is unable to convert to type LocalDateTime.

      Note, custom error messages set with HasValidationProperties.setErrorMessage(String) take priority over i18n error messages.

      Parameters:
      errorMessage - the error message to set, or null to clear
      Returns:
      this instance for method chaining
    • getIncompleteInputErrorMessage

      public String getIncompleteInputErrorMessage()
      Gets the error message displayed when either the date or time is empty.
      Returns:
      the error message or null if not set
    • setIncompleteInputErrorMessage

      public DateTimePicker.DateTimePickerI18n setIncompleteInputErrorMessage(String errorMessage)
      Sets the error message to display when either the date or time is empty.

      Note, custom error messages set with HasValidationProperties.setErrorMessage(String) take priority over i18n error messages.

      Parameters:
      errorMessage - the error message to set, or null to clear
      Returns:
      this instance for method chaining
    • getRequiredErrorMessage

      public String getRequiredErrorMessage()
      Gets the error message displayed when the field is required but empty.
      Returns:
      the error message or null if not set
      See Also:
      • HasValueAndElement.isRequiredIndicatorVisible()
      • HasValueAndElement.setRequiredIndicatorVisible(boolean)
    • setRequiredErrorMessage

      public DateTimePicker.DateTimePickerI18n setRequiredErrorMessage(String errorMessage)
      Sets the error message to display when the field is required but empty.

      Note, custom error messages set with HasValidationProperties.setErrorMessage(String) take priority over i18n error messages.

      Parameters:
      errorMessage - the error message or null to clear it
      Returns:
      this instance for method chaining
      See Also:
      • HasValueAndElement.isRequiredIndicatorVisible()
      • HasValueAndElement.setRequiredIndicatorVisible(boolean)
    • getMinErrorMessage

      public String getMinErrorMessage()
      Gets the error message displayed when the selected date and time are earlier than the minimum allowed date and time.
      Returns:
      the error message or null if not set
      See Also:
    • setMinErrorMessage

      public DateTimePicker.DateTimePickerI18n setMinErrorMessage(String errorMessage)
      Sets the error message to display when the selected date and time are earlier than the minimum allowed time.

      Note, custom error messages set with HasValidationProperties.setErrorMessage(String) take priority over i18n error messages.

      Parameters:
      errorMessage - the error message or null to clear it
      Returns:
      this instance for method chaining
      See Also:
    • getMaxErrorMessage

      public String getMaxErrorMessage()
      Gets the error message displayed when the selected date and time are later than the maximum allowed date and time.
      Returns:
      the error message or null if not set
      See Also:
    • setMaxErrorMessage

      public DateTimePicker.DateTimePickerI18n setMaxErrorMessage(String errorMessage)
      Sets the error message to display when the selected date and time are later than the maximum allowed date and time.

      Note, custom error messages set with HasValidationProperties.setErrorMessage(String) take priority over i18n error messages.

      Parameters:
      errorMessage - the error message or null to clear it
      Returns:
      this instance for method chaining
      See Also: