Class InlineDatePicker

All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasEnabled, HasSize, HasStyle, HasTheme, HasValue<AbstractField.ComponentValueChangeEvent<InlineDatePicker,LocalDate>,LocalDate>, HasValueAndElement<AbstractField.ComponentValueChangeEvent<InlineDatePicker,LocalDate>,LocalDate>, Serializable

@Tag("fc-inline-date-picker") @JsModule("./fc-inline-date-picker/fc-inline-date-picker.js") @Uses(YearMonthField.class) @Uses(MonthCalendar.class) public class InlineDatePicker extends AbstractSinglePropertyField<InlineDatePicker,LocalDate> implements HasSize, HasTheme
See Also:
  • Constructor Details

    • InlineDatePicker

      public InlineDatePicker()
      Creates a new instance of InlineDatePicker initialized with the current date and with week numbers visible.
  • Method Details

    • setWeekNumbersVisible

      public void setWeekNumbersVisible(boolean weekNumbersVisible)
      Sets whether week numbers should be visible on the calendar.

      Notice that displaying week numbers is only supported when i18n.firstDayOfWeek is 1 (Monday).

      Parameters:
      weekNumbersVisible - true if ISO-8601 week numbers should be displayed in the calendar, false otherwise
    • isWeekNumbersVisible

      public boolean isWeekNumbersVisible()
      Returns the state of the showWeekNumbers property of the datepicker.

      Note that this property is not synchronized automatically from the client side, so the returned value may not be the same as in client-side code.

      Returns:
      the state of the showWeekNumbers property of the datepicker
    • setI18n

      public void setI18n(DatePicker.DatePickerI18n i18n)
      Sets the i18n object.
      Parameters:
      i18n - the DatepickerI18n object used to initialize i18n
    • setClassNameGenerator

      public void setClassNameGenerator(ValueProvider<LocalDate,String> classNameGenerator)
      Sets the function that generates CSS class names for days in this calendar. Returning null from the generator results in no custom class name being set. Multiple class names can be returned from the generator as space-separated.
      Parameters:
      classNameGenerator - the ValueProvider to use for generating class names
    • refreshAll

      public void refreshAll()
      Refresh the styles of all dates in the displayed year and month.
    • refreshItem

      public void refreshItem(LocalDate date)
      Refresh the style of the given date.
      Parameters:
      date - the date to update the style for
    • setValue

      public void setValue(LocalDate value)
      Specified by:
      setValue in interface HasValue<AbstractField.ComponentValueChangeEvent<InlineDatePicker,LocalDate>,LocalDate>
      Overrides:
      setValue in class AbstractField<InlineDatePicker,LocalDate>