- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable
- Show / hide the name of the month
- Show / hide the year
- Show / hide arrow buttons for changing the month
- Show / hide arrow buttons for changing the year
- Show / hide today
- Show / hide a button for going to today
- Show / hide usage colors
- Perform a selection / select the date
- Show details of the date (by default shows a popover with all entries on that date)

-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<javafx.util.Callback<CalendarView,CalendarView.DateCell>> A factory for creating alternative content for the month view.A property to define a filter for determining which dates in the calendar can be selected.final javafx.beans.property.BooleanPropertyA property to control whether the "show month view" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show next month" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show next year" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show previous month" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show previous year" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show year view" button will be disabled or not.final javafx.beans.property.ObjectProperty<LocalDate>The earliest day that can be selected in the view.final javafx.beans.property.ObjectProperty<CalendarView.HeaderLayout>The header layout value determines how the information and the navigation elements in the header will be laid out.final javafx.beans.property.ObjectProperty<LocalDate>The latest day that can be selected in the view.final javafx.beans.property.BooleanPropertyDetermines whether selected dates will be marked as such when they are being displayed at the beginning of the next month or at the end of the previous month.final javafx.beans.property.ObjectProperty<CalendarView.MonthDisplayMode>The display mode for the month label at the top of the calendar view.final javafx.beans.property.BooleanPropertyDetermines whether the control offers the option to the user to pick a different month directly via a designated month selection view.final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel>final javafx.beans.property.BooleanPropertyBy default, the calendar for a given month might also show some days of the previous and the next month.final javafx.beans.property.BooleanPropertyShows or hides the arrows to change the month.final javafx.beans.property.BooleanPropertyReturns the BooleanProperty that controls the visibility of the month display in the header.final javafx.beans.property.BooleanPropertyShow or hide a button to quickly go to today's date.final javafx.beans.property.BooleanPropertyA flag used to indicate that the view will mark the area that represents the value oftodayProperty().final javafx.beans.property.BooleanPropertyControls whether the view will show week numbers.final javafx.beans.property.BooleanPropertyShow or hide the year in the header.final javafx.beans.property.ObjectProperty<LocalDate>Stores the date that is considered to represent "today".final javafx.beans.property.StringPropertyThe text that will be shown on the button used for going to today's date.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.ObjectProperty<CalendarView.YearDisplayMode>The display mode for the year label at the top of the calendar view.final javafx.beans.property.ObjectProperty<YearMonth>Stores the year and month shown by the control.final javafx.beans.property.BooleanPropertyDetermines whether the control offers the option to the user to pick a different year directly via a designated year selection view.Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe base date cell implementation for month views.static enumDifferent layouts that can be used to position the month, the year, and the various navigation elements in the header of the view.static enumEnumerates the display modes for the month label at the top of the calendar view.static classstatic enumEnumerates the display modes for the year label at the top of the calendar view. -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.ObjectProperty<javafx.util.Callback<CalendarView,CalendarView.DateCell>> A factory for creating alternative content for the month view.protected javafx.scene.control.Skin<?>A property to define a filter for determining which dates in the calendar can be selected.final javafx.beans.property.BooleanPropertyA property to control whether the "show month view" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show next month" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show next year" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show previous month" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show previous year" button will be disabled or not.final javafx.beans.property.BooleanPropertyA property to control whether the "show year view" button will be disabled or not.final javafx.beans.property.ObjectProperty<LocalDate>The earliest day that can be selected in the view.final javafx.util.Callback<CalendarView,CalendarView.DateCell> Returns the value ofcellFactoryProperty().static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> Gets the value of the property dateFilter.final LocalDateGets the value of the property earliestDate.Gets the value of the property headerLayout.final LocalDateGets the value of the property latestDate.Gets the value of the property monthDisplayMode.Gets the value of the property selectionModel.final LocalDategetToday()Returns the value oftodayProperty().final StringGets the value of the property todayText.javafx.collections.ObservableSet<DayOfWeek>Returns the days of the week that are considered to be weekend days, for example Saturday and Sunday, or Friday and Saturday.final doubleGets the value of the property weekNumberColumnWidth.Gets the value of the property yearDisplayMode.final YearMonthReturns the value ofyearMonthProperty().Returns the view used to display a month selection to the user.Returns the view used to display a year selection to the user.final javafx.beans.property.ObjectProperty<CalendarView.HeaderLayout>The header layout value determines how the information and the navigation elements in the header will be laid out.final booleanGets the value of the property disableMonthDropdownButton.final booleanGets the value of the property disableNextMonthButton.final booleanGets the value of the property disableNextYearButton.final booleanGets the value of the property disablePreviousMonthButton.final booleanGets the value of the property disablePreviousYearButton.final booleanGets the value of the property disableYearDropdownButton.final booleanGets the value of the property markSelectedDaysOfPreviousOrNextMonth.final booleanGets the value of the property monthSelectionViewEnabled.final booleanGets the value of the property showDaysOfPreviousOrNextMonth.final booleanGets the value of the property showMonth.final booleanReturns the value of theshowMonthArrowsProperty().final booleanReturns the value ofshowTodayProperty().final booleanReturns the value of theshowTodayButtonProperty().final booleanReturns the value ofshowWeekNumbersProperty().final booleanGets the value of the property showYear.final booleanGets the value of the property yearSelectionViewEnabled.final javafx.beans.property.ObjectProperty<LocalDate>The latest day that can be selected in the view.final javafx.beans.property.BooleanPropertyDetermines whether selected dates will be marked as such when they are being displayed at the beginning of the next month or at the end of the previous month.final javafx.beans.property.ObjectProperty<CalendarView.MonthDisplayMode>The display mode for the month label at the top of the calendar view.final javafx.beans.property.BooleanPropertyDetermines whether the control offers the option to the user to pick a different month directly via a designated month selection view.final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel>final voidsetCellFactory(javafx.util.Callback<CalendarView, CalendarView.DateCell> factory) Sets the value ofcellFactoryProperty().final voidsetDateFilter(javafx.util.Callback<LocalDate, Boolean> dateFilter) Sets the value of the property dateFilter.final voidsetDisableMonthDropdownButton(boolean disableMonthDropdownButton) Sets the value of the property disableMonthDropdownButton.final voidsetDisableNextMonthButton(boolean disableNextMonthButton) Sets the value of the property disableNextMonthButton.final voidsetDisableNextYearButton(boolean disableNextYearButton) Sets the value of the property disableNextYearButton.final voidsetDisablePreviousMonthButton(boolean disablePreviousMonthButton) Sets the value of the property disablePreviousMonthButton.final voidsetDisablePreviousYearButton(boolean disablePreviousYearButton) Sets the value of the property disablePreviousYearButton.final voidsetDisableYearDropdownButton(boolean disableYearDropdownButton) Sets the value of the property disableYearDropdownButton.final voidsetEarliestDate(LocalDate earliestDate) Sets the value of the property earliestDate.final voidsetHeaderLayout(CalendarView.HeaderLayout headerLayout) Sets the value of the property headerLayout.final voidsetLatestDate(LocalDate latestDate) Sets the value of the property latestDate.final voidsetMarkSelectedDaysOfPreviousOrNextMonth(boolean markSelectedDaysOfPreviousOrNextMonth) Sets the value of the property markSelectedDaysOfPreviousOrNextMonth.final voidsetMonthDisplayMode(CalendarView.MonthDisplayMode monthDisplayMode) Sets the value of the property monthDisplayMode.final voidsetMonthSelectionViewEnabled(boolean monthSelectionViewEnabled) Sets the value of the property monthSelectionViewEnabled.final voidsetSelectionModel(CalendarView.SelectionModel selectionModel) Sets the value of the property selectionModel.final voidsetShowDaysOfPreviousOrNextMonth(boolean showDaysOfPreviousOrNextMonth) Sets the value of the property showDaysOfPreviousOrNextMonth.final voidsetShowMonth(boolean showMonth) Sets the value of the property showMonth.final voidsetShowMonthArrows(boolean show) Sets the value of theshowMonthArrowsProperty().final voidsetShowToday(boolean show) Sets the value ofshowTodayProperty().final voidsetShowTodayButton(boolean show) Sets the value of theshowTodayButtonProperty().final voidsetShowWeekNumbers(boolean show) Sets the value ofshowWeekNumbersProperty().final voidsetShowYear(boolean showYear) Sets the value of the property showYear.final voidSets the value oftodayProperty().final voidsetTodayText(String todayText) Sets the value of the property todayText.final voidsetWeekNumberColumnWidth(double weekNumberColumnWidth) Sets the value of the property weekNumberColumnWidth.final voidsetYearDisplayMode(CalendarView.YearDisplayMode yearDisplayMode) Sets the value of the property yearDisplayMode.voidsetYearMonth(YearMonth yearMonth) Sets the value of the property yearMonth.final voidsetYearSelectionViewEnabled(boolean yearSelectionViewEnabled) Sets the value of the property yearSelectionViewEnabled.final javafx.beans.property.BooleanPropertyBy default, the calendar for a given month might also show some days of the previous and the next month.final javafx.beans.property.BooleanPropertyShows or hides the arrows to change the month.final javafx.beans.property.BooleanPropertyReturns the BooleanProperty that controls the visibility of the month display in the header.final javafx.beans.property.BooleanPropertyShow or hide a button to quickly go to today's date.final javafx.beans.property.BooleanPropertyA flag used to indicate that the view will mark the area that represents the value oftodayProperty().final javafx.beans.property.BooleanPropertyControls whether the view will show week numbers.final javafx.beans.property.BooleanPropertyShow or hide the year in the header.final javafx.beans.property.ObjectProperty<LocalDate>Stores the date that is considered to represent "today".final javafx.beans.property.StringPropertyThe text that will be shown on the button used for going to today's date.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.ObjectProperty<CalendarView.YearDisplayMode>The display mode for the year label at the top of the calendar view.final javafx.beans.property.ObjectProperty<YearMonth>Stores the year and month shown by the control.final javafx.beans.property.BooleanPropertyDetermines whether the control offers the option to the user to pick a different year directly via a designated year selection view.Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipPropertyMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
yearMonth
Stores the year and month shown by the control.- See Also:
-
showWeekNumbers
public final javafx.beans.property.BooleanProperty showWeekNumbersPropertyControls whether the view will show week numbers. -
markSelectedDaysOfPreviousOrNextMonth
public final javafx.beans.property.BooleanProperty markSelectedDaysOfPreviousOrNextMonthPropertyDetermines whether selected dates will be marked as such when they are being displayed at the beginning of the next month or at the end of the previous month. -
showDaysOfPreviousOrNextMonth
public final javafx.beans.property.BooleanProperty showDaysOfPreviousOrNextMonthPropertyBy default, the calendar for a given month might also show some days of the previous and the next month. This property allows applications to hide them if needed. -
today
Stores the date that is considered to represent "today". This property is initialized withLocalDate.now()but can be any date.- See Also:
-
showToday
public final javafx.beans.property.BooleanProperty showTodayPropertyA flag used to indicate that the view will mark the area that represents the value oftodayProperty(). By default, this area will be filled with a different color (red) than the rest (white).
- See Also:
-
disablePreviousMonthButton
public final javafx.beans.property.BooleanProperty disablePreviousMonthButtonPropertyA property to control whether the "show previous month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a month that is earlier than the first calendar. -
disableNextMonthButton
public final javafx.beans.property.BooleanProperty disableNextMonthButtonPropertyA property to control whether the "show next month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a month that is later than the second calendar. -
disableNextYearButton
public final javafx.beans.property.BooleanProperty disableNextYearButtonPropertyA property to control whether the "show next year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a year that is later than the second calendar. -
disablePreviousYearButton
public final javafx.beans.property.BooleanProperty disablePreviousYearButtonPropertyA property to control whether the "show previous year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a year that is earlier than the first calendar. -
disableMonthDropdownButton
public final javafx.beans.property.BooleanProperty disableMonthDropdownButtonPropertyA property to control whether the "show month view" button will be disabled or not. -
disableYearDropdownButton
public final javafx.beans.property.BooleanProperty disableYearDropdownButtonPropertyA property to control whether the "show year view" button will be disabled or not. -
dateFilter
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<LocalDate,Boolean>> dateFilterPropertyA property to define a filter for determining which dates in the calendar can be selected. This filter is applied to each date displayed in the calendar. If the filter returns true for a given date, that date will be selectable (i.e., it passes the filter). If the filter returns false, the date will be disabled and cannot be selected. This property is particularly useful for scenarios where only specific dates should be available for selection based on custom logic, such as business rules, holidays, or availability.When SelectionMode is
CalendarView.SelectionModel.SelectionMode.DATE_RANGE, disabled dates can be included within the selected range. However, disabled dates cannot be used as either the starting or ending point of the range.- See Also:
-
cellFactory
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<CalendarView,CalendarView.DateCell>> cellFactoryPropertyA factory for creating alternative content for the month view. The image below shows theCalendarViewonce with the default factory and once with an alternative factory that creates checkboxes.
- See Also:
-
monthSelectionViewEnabled
public final javafx.beans.property.BooleanProperty monthSelectionViewEnabledPropertyDetermines whether the control offers the option to the user to pick a different month directly via a designated month selection view. -
yearSelectionViewEnabled
public final javafx.beans.property.BooleanProperty yearSelectionViewEnabledPropertyDetermines whether the control offers the option to the user to pick a different year directly via a designated year selection view. -
showMonth
public final javafx.beans.property.BooleanProperty showMonthPropertyReturns the BooleanProperty that controls the visibility of the month display in the header. This property impacts whether the month name and month navigation controls are shown.- See Also:
-
showYear
public final javafx.beans.property.BooleanProperty showYearPropertyShow or hide the year in the header.- See Also:
-
showTodayButton
public final javafx.beans.property.BooleanProperty showTodayButtonPropertyShow or hide a button to quickly go to today's date. -
showMonthArrows
public final javafx.beans.property.BooleanProperty showMonthArrowsPropertyShows or hides the arrows to change the month. -
selectionModel
public final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel> selectionModelProperty -
weekNumberColumnWidth
public final javafx.beans.property.DoubleProperty weekNumberColumnWidthProperty -
headerLayout
The header layout value determines how the information and the navigation elements in the header will be laid out. -
todayText
public final javafx.beans.property.StringProperty todayTextPropertyThe text that will be shown on the button used for going to today's date.- See Also:
-
earliestDate
The earliest day that can be selected in the view.- See Also:
-
latestDate
The latest day that can be selected in the view.- See Also:
-
yearDisplayMode
public final javafx.beans.property.ObjectProperty<CalendarView.YearDisplayMode> yearDisplayModePropertyThe display mode for the year label at the top of the calendar view.CalendarView.YearDisplayMode.TEXT_ONLYis the default mode. -
monthDisplayMode
public final javafx.beans.property.ObjectProperty<CalendarView.MonthDisplayMode> monthDisplayModePropertyThe display mode for the month label at the top of the calendar view.CalendarView.MonthDisplayMode.TEXT_ONLYis the default mode.
-
-
Constructor Details
-
CalendarView
public CalendarView()Constructs a new view.
-
-
Method Details
-
createDefaultSkin
protected javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkinin classjavafx.scene.control.Control
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheetin classjavafx.scene.layout.Region
-
getYearMonthView
Returns the view used to display a month selection to the user. Applications can choose to override this method and return their own custom view.- Returns:
- the view used for showing and selecting a month
-
getYearView
Returns the view used to display a year selection to the user. Applications can choose to override this method and return their own custom view.- Returns:
- the view used for showing and selecting a year
-
yearMonthProperty
Stores the year and month shown by the control.- See Also:
-
getYearMonth
Returns the value ofyearMonthProperty().- Returns:
- the year and month
-
setYearMonth
Sets the value of the property yearMonth.- Property description:
- Stores the year and month shown by the control.
-
getWeekendDays
Returns the days of the week that are considered to be weekend days, for example Saturday and Sunday, or Friday and Saturday.- Returns:
- the weekend days
-
showWeekNumbersProperty
public final javafx.beans.property.BooleanProperty showWeekNumbersProperty()Controls whether the view will show week numbers. -
setShowWeekNumbers
public final void setShowWeekNumbers(boolean show) Sets the value ofshowWeekNumbersProperty().- Parameters:
show- if true will show week numbers
-
isShowWeekNumbers
public final boolean isShowWeekNumbers()Returns the value ofshowWeekNumbersProperty().- Returns:
- true if week numbers will be shown
-
isMarkSelectedDaysOfPreviousOrNextMonth
public final boolean isMarkSelectedDaysOfPreviousOrNextMonth()Gets the value of the property markSelectedDaysOfPreviousOrNextMonth.- Property description:
- Determines whether selected dates will be marked as such when they are being displayed at the beginning of the next month or at the end of the previous month.
-
markSelectedDaysOfPreviousOrNextMonthProperty
public final javafx.beans.property.BooleanProperty markSelectedDaysOfPreviousOrNextMonthProperty()Determines whether selected dates will be marked as such when they are being displayed at the beginning of the next month or at the end of the previous month. -
setMarkSelectedDaysOfPreviousOrNextMonth
public final void setMarkSelectedDaysOfPreviousOrNextMonth(boolean markSelectedDaysOfPreviousOrNextMonth) Sets the value of the property markSelectedDaysOfPreviousOrNextMonth.- Property description:
- Determines whether selected dates will be marked as such when they are being displayed at the beginning of the next month or at the end of the previous month.
-
isShowDaysOfPreviousOrNextMonth
public final boolean isShowDaysOfPreviousOrNextMonth()Gets the value of the property showDaysOfPreviousOrNextMonth.- Property description:
- By default, the calendar for a given month might also show some days of the previous and the next month. This property allows applications to hide them if needed.
-
showDaysOfPreviousOrNextMonthProperty
public final javafx.beans.property.BooleanProperty showDaysOfPreviousOrNextMonthProperty()By default, the calendar for a given month might also show some days of the previous and the next month. This property allows applications to hide them if needed. -
setShowDaysOfPreviousOrNextMonth
public final void setShowDaysOfPreviousOrNextMonth(boolean showDaysOfPreviousOrNextMonth) Sets the value of the property showDaysOfPreviousOrNextMonth.- Property description:
- By default, the calendar for a given month might also show some days of the previous and the next month. This property allows applications to hide them if needed.
-
todayProperty
Stores the date that is considered to represent "today". This property is initialized withLocalDate.now()but can be any date.- See Also:
-
setToday
Sets the value oftodayProperty().- Parameters:
date- the date representing "today"
-
getToday
Returns the value oftodayProperty().- Returns:
- the date representing "today"
-
showTodayProperty
public final javafx.beans.property.BooleanProperty showTodayProperty()A flag used to indicate that the view will mark the area that represents the value oftodayProperty(). By default, this area will be filled with a different color (red) than the rest (white).
- See Also:
-
isShowToday
public final boolean isShowToday()Returns the value ofshowTodayProperty().- Returns:
- true if today will be highlighted visually
-
setShowToday
public final void setShowToday(boolean show) Sets the value ofshowTodayProperty().- Parameters:
show- if true today will be highlighted visually
-
isDisablePreviousMonthButton
public final boolean isDisablePreviousMonthButton()Gets the value of the property disablePreviousMonthButton.- Property description:
- A property to control whether the "show previous month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a month that is earlier than the first calendar.
-
disablePreviousMonthButtonProperty
public final javafx.beans.property.BooleanProperty disablePreviousMonthButtonProperty()A property to control whether the "show previous month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a month that is earlier than the first calendar. -
setDisablePreviousMonthButton
public final void setDisablePreviousMonthButton(boolean disablePreviousMonthButton) Sets the value of the property disablePreviousMonthButton.- Property description:
- A property to control whether the "show previous month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a month that is earlier than the first calendar.
-
isDisableNextMonthButton
public final boolean isDisableNextMonthButton()Gets the value of the property disableNextMonthButton.- Property description:
- A property to control whether the "show next month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a month that is later than the second calendar.
-
disableNextMonthButtonProperty
public final javafx.beans.property.BooleanProperty disableNextMonthButtonProperty()A property to control whether the "show next month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a month that is later than the second calendar. -
setDisableNextMonthButton
public final void setDisableNextMonthButton(boolean disableNextMonthButton) Sets the value of the property disableNextMonthButton.- Property description:
- A property to control whether the "show next month" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a month that is later than the second calendar.
-
isDisableNextYearButton
public final boolean isDisableNextYearButton()Gets the value of the property disableNextYearButton.- Property description:
- A property to control whether the "show next year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a year that is later than the second calendar.
-
disableNextYearButtonProperty
public final javafx.beans.property.BooleanProperty disableNextYearButtonProperty()A property to control whether the "show next year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a year that is later than the second calendar. -
setDisableNextYearButton
public final void setDisableNextYearButton(boolean disableNextYearButton) Sets the value of the property disableNextYearButton.- Property description:
- A property to control whether the "show next year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the first calendar should never show a year that is later than the second calendar.
-
isDisablePreviousYearButton
public final boolean isDisablePreviousYearButton()Gets the value of the property disablePreviousYearButton.- Property description:
- A property to control whether the "show previous year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a year that is earlier than the first calendar.
-
disablePreviousYearButtonProperty
public final javafx.beans.property.BooleanProperty disablePreviousYearButtonProperty()A property to control whether the "show previous year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a year that is earlier than the first calendar. -
setDisablePreviousYearButton
public final void setDisablePreviousYearButton(boolean disablePreviousYearButton) Sets the value of the property disablePreviousYearButton.- Property description:
- A property to control whether the "show previous year" button will be disabled or not. This property can be very useful when working with (for example) two calendars used for selecting a date range. Then the second calendar should never show a year that is earlier than the first calendar.
-
isDisableMonthDropdownButton
public final boolean isDisableMonthDropdownButton()Gets the value of the property disableMonthDropdownButton.- Property description:
- A property to control whether the "show month view" button will be disabled or not.
-
disableMonthDropdownButtonProperty
public final javafx.beans.property.BooleanProperty disableMonthDropdownButtonProperty()A property to control whether the "show month view" button will be disabled or not. -
setDisableMonthDropdownButton
public final void setDisableMonthDropdownButton(boolean disableMonthDropdownButton) Sets the value of the property disableMonthDropdownButton.- Property description:
- A property to control whether the "show month view" button will be disabled or not.
-
isDisableYearDropdownButton
public final boolean isDisableYearDropdownButton()Gets the value of the property disableYearDropdownButton.- Property description:
- A property to control whether the "show year view" button will be disabled or not.
-
disableYearDropdownButtonProperty
public final javafx.beans.property.BooleanProperty disableYearDropdownButtonProperty()A property to control whether the "show year view" button will be disabled or not. -
setDisableYearDropdownButton
public final void setDisableYearDropdownButton(boolean disableYearDropdownButton) Sets the value of the property disableYearDropdownButton.- Property description:
- A property to control whether the "show year view" button will be disabled or not.
-
getDateFilter
Gets the value of the property dateFilter.- Property description:
- A property to define a filter for determining which dates in the calendar can be selected.
This filter is applied to each date displayed in the calendar. If the filter returns true for
a given date, that date will be selectable (i.e., it passes the filter). If the filter returns
false, the date will be disabled and cannot be selected. This property is particularly useful
for scenarios where only specific dates should be available for selection based on custom
logic, such as business rules, holidays, or availability.
When SelectionMode is
CalendarView.SelectionModel.SelectionMode.DATE_RANGE, disabled dates can be included within the selected range. However, disabled dates cannot be used as either the starting or ending point of the range.
-
dateFilterProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<LocalDate,Boolean>> dateFilterProperty()A property to define a filter for determining which dates in the calendar can be selected. This filter is applied to each date displayed in the calendar. If the filter returns true for a given date, that date will be selectable (i.e., it passes the filter). If the filter returns false, the date will be disabled and cannot be selected. This property is particularly useful for scenarios where only specific dates should be available for selection based on custom logic, such as business rules, holidays, or availability.When SelectionMode is
CalendarView.SelectionModel.SelectionMode.DATE_RANGE, disabled dates can be included within the selected range. However, disabled dates cannot be used as either the starting or ending point of the range.- See Also:
-
setDateFilter
Sets the value of the property dateFilter.- Property description:
- A property to define a filter for determining which dates in the calendar can be selected.
This filter is applied to each date displayed in the calendar. If the filter returns true for
a given date, that date will be selectable (i.e., it passes the filter). If the filter returns
false, the date will be disabled and cannot be selected. This property is particularly useful
for scenarios where only specific dates should be available for selection based on custom
logic, such as business rules, holidays, or availability.
When SelectionMode is
CalendarView.SelectionModel.SelectionMode.DATE_RANGE, disabled dates can be included within the selected range. However, disabled dates cannot be used as either the starting or ending point of the range.
-
cellFactoryProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<CalendarView,CalendarView.DateCell>> cellFactoryProperty()A factory for creating alternative content for the month view. The image below shows theCalendarViewonce with the default factory and once with an alternative factory that creates checkboxes.
- See Also:
-
setCellFactory
Sets the value ofcellFactoryProperty().- Parameters:
factory- the cell factory
-
getCellFactory
Returns the value ofcellFactoryProperty().- Returns:
- the cell factory
-
isMonthSelectionViewEnabled
public final boolean isMonthSelectionViewEnabled()Gets the value of the property monthSelectionViewEnabled.- Property description:
- Determines whether the control offers the option to the user to pick a different month directly via a designated month selection view.
-
monthSelectionViewEnabledProperty
public final javafx.beans.property.BooleanProperty monthSelectionViewEnabledProperty()Determines whether the control offers the option to the user to pick a different month directly via a designated month selection view. -
setMonthSelectionViewEnabled
public final void setMonthSelectionViewEnabled(boolean monthSelectionViewEnabled) Sets the value of the property monthSelectionViewEnabled.- Property description:
- Determines whether the control offers the option to the user to pick a different month directly via a designated month selection view.
-
isYearSelectionViewEnabled
public final boolean isYearSelectionViewEnabled()Gets the value of the property yearSelectionViewEnabled.- Property description:
- Determines whether the control offers the option to the user to pick a different year directly via a designated year selection view.
-
yearSelectionViewEnabledProperty
public final javafx.beans.property.BooleanProperty yearSelectionViewEnabledProperty()Determines whether the control offers the option to the user to pick a different year directly via a designated year selection view. -
setYearSelectionViewEnabled
public final void setYearSelectionViewEnabled(boolean yearSelectionViewEnabled) Sets the value of the property yearSelectionViewEnabled.- Property description:
- Determines whether the control offers the option to the user to pick a different year directly via a designated year selection view.
-
isShowMonth
public final boolean isShowMonth()Gets the value of the property showMonth.- Property description:
- Returns the BooleanProperty that controls the visibility of the month display in the header. This property impacts whether the month name and month navigation controls are shown.
-
showMonthProperty
public final javafx.beans.property.BooleanProperty showMonthProperty()Returns the BooleanProperty that controls the visibility of the month display in the header. This property impacts whether the month name and month navigation controls are shown.- See Also:
-
setShowMonth
public final void setShowMonth(boolean showMonth) Sets the value of the property showMonth.- Property description:
- Returns the BooleanProperty that controls the visibility of the month display in the header. This property impacts whether the month name and month navigation controls are shown.
-
isShowYear
public final boolean isShowYear()Gets the value of the property showYear.- Property description:
- Show or hide the year in the header.
-
showYearProperty
public final javafx.beans.property.BooleanProperty showYearProperty()Show or hide the year in the header.- See Also:
-
setShowYear
public final void setShowYear(boolean showYear) Sets the value of the property showYear.- Property description:
- Show or hide the year in the header.
-
showTodayButtonProperty
public final javafx.beans.property.BooleanProperty showTodayButtonProperty()Show or hide a button to quickly go to today's date. -
setShowTodayButton
public final void setShowTodayButton(boolean show) Sets the value of theshowTodayButtonProperty().- Parameters:
show- if true will show the button
-
isShowTodayButton
public final boolean isShowTodayButton()Returns the value of theshowTodayButtonProperty().- Returns:
- true if the button is shown
-
showMonthArrowsProperty
public final javafx.beans.property.BooleanProperty showMonthArrowsProperty()Shows or hides the arrows to change the month. -
setShowMonthArrows
public final void setShowMonthArrows(boolean show) Sets the value of theshowMonthArrowsProperty().- Parameters:
show- if true will show the arrows
-
isShowMonthArrows
public final boolean isShowMonthArrows()Returns the value of theshowMonthArrowsProperty().- Returns:
- true if the arrows will be shown
-
getSelectionModel
Gets the value of the property selectionModel.- Property description:
-
selectionModelProperty
public final javafx.beans.property.ObjectProperty<CalendarView.SelectionModel> selectionModelProperty() -
setSelectionModel
Sets the value of the property selectionModel.- Property description:
-
getWeekNumberColumnWidth
public final double getWeekNumberColumnWidth()Gets the value of the property weekNumberColumnWidth.- Property description:
-
weekNumberColumnWidthProperty
public final javafx.beans.property.DoubleProperty weekNumberColumnWidthProperty() -
setWeekNumberColumnWidth
public final void setWeekNumberColumnWidth(double weekNumberColumnWidth) Sets the value of the property weekNumberColumnWidth.- Property description:
-
getHeaderLayout
Gets the value of the property headerLayout.- Property description:
- The header layout value determines how the information and the navigation elements in the header will be laid out.
-
headerLayoutProperty
The header layout value determines how the information and the navigation elements in the header will be laid out. -
setHeaderLayout
Sets the value of the property headerLayout.- Property description:
- The header layout value determines how the information and the navigation elements in the header will be laid out.
-
getTodayText
Gets the value of the property todayText.- Property description:
- The text that will be shown on the button used for going to today's date.
-
todayTextProperty
public final javafx.beans.property.StringProperty todayTextProperty()The text that will be shown on the button used for going to today's date.- See Also:
-
setTodayText
Sets the value of the property todayText.- Property description:
- The text that will be shown on the button used for going to today's date.
-
getEarliestDate
Gets the value of the property earliestDate.- Property description:
- The earliest day that can be selected in the view.
-
earliestDateProperty
The earliest day that can be selected in the view.- See Also:
-
setEarliestDate
Sets the value of the property earliestDate.- Property description:
- The earliest day that can be selected in the view.
-
getLatestDate
Gets the value of the property latestDate.- Property description:
- The latest day that can be selected in the view.
-
latestDateProperty
The latest day that can be selected in the view.- See Also:
-
setLatestDate
Sets the value of the property latestDate.- Property description:
- The latest day that can be selected in the view.
-
yearDisplayModeProperty
public final javafx.beans.property.ObjectProperty<CalendarView.YearDisplayMode> yearDisplayModeProperty()The display mode for the year label at the top of the calendar view.CalendarView.YearDisplayMode.TEXT_ONLYis the default mode. -
getYearDisplayMode
Gets the value of the property yearDisplayMode.- Property description:
- The display mode for the year label at the top of the calendar view.
CalendarView.YearDisplayMode.TEXT_ONLYis the default mode.
-
setYearDisplayMode
Sets the value of the property yearDisplayMode.- Property description:
- The display mode for the year label at the top of the calendar view.
CalendarView.YearDisplayMode.TEXT_ONLYis the default mode.
-
monthDisplayModeProperty
public final javafx.beans.property.ObjectProperty<CalendarView.MonthDisplayMode> monthDisplayModeProperty()The display mode for the month label at the top of the calendar view.CalendarView.MonthDisplayMode.TEXT_ONLYis the default mode. -
getMonthDisplayMode
Gets the value of the property monthDisplayMode.- Property description:
- The display mode for the month label at the top of the calendar view.
CalendarView.MonthDisplayMode.TEXT_ONLYis the default mode.
-
setMonthDisplayMode
Sets the value of the property monthDisplayMode.- Property description:
- The display mode for the month label at the top of the calendar view.
CalendarView.MonthDisplayMode.TEXT_ONLYis the default mode.
-
getControlCssMetaData
- Overrides:
getControlCssMetaDatain classjavafx.scene.control.Control
-
getClassCssMetaData
-