@Tag(value="fc-month-calendar")
@JsModule(value="./fc-month-calendar/month-calendar-mixin.js") @JsModule(value="./fc-month-calendar/fc-month-calendar.js")
@NpmPackage(value="@polymer/iron-a11y-keys-behavior",
version="3.0.1")
@Uses(value=com.vaadin.flow.component.datepicker.DatePicker.class)
public class MonthCalendar
extends AbstractCalendarComponent<MonthCalendar>
implements com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasTheme
| Constructor and Description |
|---|
MonthCalendar(int year,
Month month)
Creates a new instance of
MonthCalendar for the given year and month. |
MonthCalendar(YearMonth yearMonth)
Creates a new instance of
MonthCalendar for the given year-and-month. |
| Modifier and Type | Method and Description |
|---|---|
Month |
getMonth()
Returns the month-of-year that is displayed in this calendar.
|
YearMonth |
getYearMonth()
Returns the year-and-month that is displayed in this calendar.
|
void |
refreshAll()
Refresh the styles for all the dates in the displayed year-and-month.
|
void |
refreshItem(LocalDate date)
Refresh the style for the given date.
|
void |
setClassNameGenerator(com.vaadin.flow.function.ValueProvider<LocalDate,String> classNameGenerator)
Sets the function that is used for generating CSS class names for rows in this calendar.
|
void |
setReadOnly(boolean readOnly) |
void |
setYearMonth(YearMonth yearMonth)
Sets the year-and-month that is displayed in this calendar.
|
addDateSelectedListener, onAttach, setI18naddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullpublic MonthCalendar(int year,
Month month)
MonthCalendar for the given year and month.public MonthCalendar(YearMonth yearMonth)
MonthCalendar for the given year-and-month.public void setReadOnly(boolean readOnly)
public YearMonth getYearMonth()
public Month getMonth()
public void setYearMonth(YearMonth yearMonth)
public void setClassNameGenerator(com.vaadin.flow.function.ValueProvider<LocalDate,String> classNameGenerator)
null from the generator results in no custom class name being set. Multiple
class names can be returned from the generator as space-separated.public void refreshAll()
refreshAll in class AbstractCalendarComponent<MonthCalendar>public void refreshItem(LocalDate date)
IllegalArgumentException - if the displayed year-and-month does not contain date.Copyright © 2021–2022 Flowing Code. All rights reserved.