- All Implemented Interfaces:
MFXMenuControl,Validated,Styleable,EventTarget,Skinnable
DatePicker for JavaFX.
A date picker is basically a text field which shows a popup containing a calendar
for a specific month. For this reason, extends MFXTextField.
Compared to the previous implementation (that was just a wrapper for the original
DatePicker), and the JavaFX's one, the new implementation is much simpler and customizable.
The main features of this new date picker are:
- Floating text (inherited from MFXTextField)
- Allows to fully control the popup (offset, alignment)
- Has three separate converters to convert LocalDate, Month and DayOfWeek to/from String.
Those are specified with Suppliers. The default converters always take into account the date picker's localeProperty()
- Has a cell factory function to change the cells
- Allows specifying what to do when editing the text on confirm or cancel (by default, specifies in the skin, ENTER to commit and Ctrl+Shift+Z to cancel
- Allows to easily change the language by setting the localeProperty()
- Has a property to get the current date, plus it's possible to automatically or programmatically update it as days pass
- Allows to specify the range of years for the date picker
- Allows to specify the starting YearMonth of the calendar
- Also adds a new PseudoClass that activates when the popup opens
- Since inherits from MFXTextField, it can be also used as a Label, disabling edit and selection.
gridAlgorithmProperty().
By default the date picker uses DateTimeUtils.fullIntMonthMatrix(Locale, YearMonth) to generate a 6x7
grid (rows x columns, it's a bi-dimensional array)-
Property Summary
PropertiesTypePropertyDescriptionSpecifies the function used to create the day cells in the grid.Specifies the current date.Specifies theBiFunctionused to generate the month grid which is a bi-dimensional array of integer values.Specifies theLocaleused by this date picker.Specifies the action to perform oncancel(String).Specifies the action to perform oncommit(String).Specifies the popup's alignment.Specifies the popup's x offset.Specifies the popup's y offset.Specifies whether the popup is showing.Specifies the current selected date.Specifies the years range of the date picker.Properties inherited from class io.github.palexdev.materialfx.controls.MFXTextField
allowEdit, animated, borderGap, caretVisible, delegateAnchor, delegateCaretPosition, delegateFocused, delegateRedoable, delegateSelectedText, delegateSelection, delegateTextFormatter, delegateUndoable, floating, floatingTextGap, floatingText, floatMode, graphicTextGap, leadingIcon, measureUnitGap, measureUnit, scaleOnAbove, selectable, textFill, textLimit, trailingIconProperties inherited from class javafx.scene.control.TextField
alignment, onAction, prefColumnCountProperties inherited from class javafx.scene.control.TextInputControl
anchor, caretPosition, editable, font, length, promptText, redoable, selectedText, selection, textFormatter, text, undoableProperties 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, 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 classes/interfaces inherited from class javafx.scene.control.TextInputControl
TextInputControl.Content -
Field Summary
FieldsFields inherited from class io.github.palexdev.materialfx.controls.MFXTextField
boundField, contextMenu, DEFAULT_TEXT_COLOR, floating, validatorFields inherited from class javafx.scene.control.TextField
DEFAULT_PREF_COLUMN_COUNTFields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHTFields inherited from interface io.github.palexdev.materialfx.validation.Validated
INVALID_PSEUDO_CLASS -
Constructor Summary
ConstructorsConstructorDescriptionMFXDatePicker(Locale locale) MFXDatePicker(Locale locale, YearMonth startingYearMonth) -
Method Summary
Modifier and TypeMethodDescriptionvoidIf the date picker is editable and the text has been changed, this method is responsible for deciding what to do with the new text.Specifies the function used to create the day cells in the grid.voidIf the date picker is editable and the text has been changed, this method is responsible for deciding what to do with the new text.protected Skin<?>Specifies the current date.voidSets/Re-sets the default cell factory.voidvoidSets/Re-sets the default icon to open the popup.Gets the value of the property cellFactory.Gets the value of the property converterSupplier.Gets the value of the property currentDate.Gets the value of the property dayOfWeekConverterSupplier.BiFunction<Locale,YearMonth, Integer[][]> Gets the value of the property gridAlgorithm.Gets the value of the property locale.Gets the value of the property monthConverterSupplier.Gets the value of the property onCancel.Gets the value of the property onCommit.Gets the value of the property popupAlignment.doubleGets the value of the property popupOffsetX.doubleGets the value of the property popupOffsetY.getValue()Gets the value of the property value.Gets the value of the property yearsRange.Specifies theBiFunctionused to generate the month grid which is a bi-dimensional array of integer values.voidhide()Hides the popup.booleanbooleanGets the value of the property showing.Specifies theLocaleused by this date picker.Specifies the action to perform oncancel(String).Specifies the action to perform oncommit(String).Specifies the popup's alignment.Specifies the popup's x offset.Specifies the popup's y offset.voidsetCellFactory(Function<LocalDate, MFXDateCell> cellFactory) Sets the value of the property cellFactory.voidsetClosePopupOnChange(boolean closePopupOnChange) voidsetConverterSupplier(Supplier<StringConverter<LocalDate>> converterSupplier) Sets the value of the property converterSupplier.voidsetDayOfWeekConverterSupplier(Supplier<StringConverter<DayOfWeek>> dayOfWeekConverterSupplier) Sets the value of the property dayOfWeekConverterSupplier.voidsetGridAlgorithm(BiFunction<Locale, YearMonth, Integer[][]> gridAlgorithm) Sets the value of the property gridAlgorithm.voidSets the value of the property locale.voidsetMonthConverterSupplier(Supplier<StringConverter<Month>> monthConverterSupplier) Sets the value of the property monthConverterSupplier.voidsetOnCancel(Consumer<String> onCancel) Sets the value of the property onCancel.voidsetOnCommit(Consumer<String> onCommit) Sets the value of the property onCommit.voidsetPopupAlignment(Alignment popupAlignment) Sets the value of the property popupAlignment.voidsetPopupOffsetX(double popupOffsetX) Sets the value of the property popupOffsetX.voidsetPopupOffsetY(double popupOffsetY) Sets the value of the property popupOffsetY.voidsetStartingYearMonth(YearMonth startingYearMonth) Sets theYearMonthat which the date picker will start.voidSets the value of the property value.voidsetYearsRange(NumberRange<Integer> yearsRange) Sets the value of the property yearsRange.voidshow()Shows the popup.Specifies whether the popup is showing.voidStarts the executor responsible for updating the current day property once per day.voidStops the executor responsible for updating the current day property.voidUpdates the current date property withLocalDate.now()Specifies the current selected date.Specifies the years range of the date picker.Methods inherited from class io.github.palexdev.materialfx.controls.MFXTextField
allowEditProperty, animatedProperty, asLabel, asLabel, asLabel, asLabel, backward, borderGapProperty, caretVisibleProperty, clear, copy, cut, defaultContextMenu, delegateAnchorProperty, delegateCaretPositionProperty, delegateFocusedProperty, delegateGetAnchor, delegateGetCaretPosition, delegateGetSelectedText, delegateGetSelection, delegateGetTextFormatter, delegateIsFocused, delegateIsRedoable, delegateIsUndoable, delegateRedoableProperty, delegateSelectedTextProperty, delegateSelectionProperty, delegateSetTextFormatter, delegateTextFormatterProperty, delegateUndoableProperty, deselect, end, endOfNextWord, extendSelection, floatingProperty, floatingTextGapProperty, floatingTextProperty, floatModeProperty, forward, getBorderGap, getCaretVisible, getClassCssMetaData, getControlCssMetaData, getFloatingText, getFloatingTextGap, getFloatMode, getGraphicTextGap, getLeadingIcon, getMeasureUnit, getMeasureUnitGap, getMFXContextMenu, getTextFill, getTextLimit, getTrailingIcon, getValidator, graphicTextGapProperty, home, isAllowEdit, isAnimated, isFloating, isSelectable, leadingIconProperty, measureUnitGapProperty, measureUnitProperty, nextWord, paste, positionCaret, previousWord, replaceSelection, scaleOnAbove, scaleOnAboveProperty, selectableProperty, selectAll, selectBackward, selectEnd, selectEndOfNextWord, selectForward, selectHome, selectNextWord, selectPositionCaret, selectPreviousWord, selectRange, setAllowEdit, setAnimated, setBorderGap, setCaretVisible, setFloatingText, setFloatingTextGap, setFloatMode, setGraphicTextGap, setLeadingIcon, setMeasureUnit, setMeasureUnitGap, setScaleOnAbove, setSelectable, setTextFill, setTextLimit, setTrailingIcon, textFillProperty, textLimitProperty, trailingIconPropertyMethods inherited from class javafx.scene.control.TextField
alignmentProperty, getAlignment, getCharacters, getOnAction, getPrefColumnCount, onActionProperty, prefColumnCountProperty, setAlignment, setOnAction, setPrefColumnCountMethods inherited from class javafx.scene.control.TextInputControl
anchorProperty, appendText, cancelEdit, caretPositionProperty, commitValue, deleteNextChar, deletePreviousChar, deleteText, deleteText, editableProperty, executeAccessibleAction, fontProperty, getAnchor, getCaretPosition, getContent, getFont, getLength, getPromptText, getSelectedText, getSelection, getText, getText, getTextFormatter, insertText, isEditable, isRedoable, isUndoable, lengthProperty, promptTextProperty, queryAccessibleAttribute, redo, redoableProperty, replaceText, replaceText, selectedTextProperty, selectionProperty, setEditable, setFont, setPromptText, setText, setTextFormatter, textFormatterProperty, textProperty, undo, undoablePropertyMethods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, 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, 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, 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 io.github.palexdev.materialfx.controls.base.MFXMenuControl
isContextMenuDisabled, setContextMenuDisabledMethods inherited from interface javafx.css.Styleable
getStyleableNodeMethods inherited from interface io.github.palexdev.materialfx.validation.Validated
isValid, updateInvalid, validate
-
Property Details
-
showing
Specifies whether the popup is showing.- See Also:
-
popupAlignment
Specifies the popup's alignment. -
popupOffsetX
Specifies the popup's x offset.- See Also:
-
popupOffsetY
Specifies the popup's y offset.- See Also:
-
locale
Specifies theLocaleused by this date picker. The Locale is mainly responsible for changing the language and the grid disposition (different week start for example)- See Also:
-
value
Specifies the current selected date.- See Also:
-
converterSupplier
-
monthConverterSupplier
-
dayOfWeekConverterSupplier
-
onCommit
Specifies the action to perform oncommit(String).- See Also:
-
onCancel
Specifies the action to perform oncancel(String).- See Also:
-
cellFactory
Specifies the function used to create the day cells in the grid.- See Also:
-
currentDate
Specifies the current date.- See Also:
-
yearsRange
Specifies the years range of the date picker.- See Also:
-
gridAlgorithm
Specifies theBiFunctionused to generate the month grid which is a bi-dimensional array of integer values.
-
-
Field Details
-
POPUP_OPEN_PSEUDO_CLASS
-
-
Constructor Details
-
MFXDatePicker
public MFXDatePicker() -
MFXDatePicker
-
MFXDatePicker
-
-
Method Details
-
defaultCellFactory
public void defaultCellFactory()Sets/Re-sets the default cell factory. -
defaultConverters
public void defaultConverters()Sets/Re-sets the default converters forLocalDate,Month,DayOfWeek. For:- LocalDate: uses
DateStringConverterwithFormatStyle.MEDIUM- Month: uses
MonthStringConverterwith the date picker's locale andTextStyle.FULL- DayOfWeek: uses
DayOfWeekStringConverterwith the date picker's locale andTextStyle.SHORT -
defaultIcon
public void defaultIcon()Sets/Re-sets the default icon to open the popup. -
show
public void show()Shows the popup. -
hide
public void hide()Hides the popup. -
commit
If the date picker is editable and the text has been changed, this method is responsible for deciding what to do with the new text. By default this implementation calls the specifiedonCommitProperty()consumer to perform an action on commit. So, instead of overriding the method you can easily modify its behavior by changing the consumer. -
cancel
If the date picker is editable and the text has been changed, this method is responsible for deciding what to do with the new text. By default this implementation calls the specifiedonCancelProperty()consumer to perform an action on cancel. So, instead of overriding the method you can easily modify its behavior by changing the consumer. -
startCurrentDayUpdater
public void startCurrentDayUpdater()Starts the executor responsible for updating the current day property once per day. -
stopCurrentDayUpdater
public void stopCurrentDayUpdater()Stops the executor responsible for updating the current day property. -
createDefaultSkin
- Overrides:
createDefaultSkinin classMFXTextField
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheetin classMFXTextField
-
isShowing
public boolean isShowing()Gets the value of the property showing.- Property description:
- Specifies whether the popup is showing.
-
showingProperty
Specifies whether the popup is showing.- See Also:
-
getPopupAlignment
Gets the value of the property popupAlignment.- Property description:
- Specifies the popup's alignment.
-
popupAlignmentProperty
Specifies the popup's alignment. -
setPopupAlignment
Sets the value of the property popupAlignment.- Property description:
- Specifies the popup's alignment.
-
getPopupOffsetX
public double getPopupOffsetX()Gets the value of the property popupOffsetX.- Property description:
- Specifies the popup's x offset.
-
popupOffsetXProperty
Specifies the popup's x offset.- See Also:
-
setPopupOffsetX
public void setPopupOffsetX(double popupOffsetX) Sets the value of the property popupOffsetX.- Property description:
- Specifies the popup's x offset.
-
getPopupOffsetY
public double getPopupOffsetY()Gets the value of the property popupOffsetY.- Property description:
- Specifies the popup's y offset.
-
popupOffsetYProperty
Specifies the popup's y offset.- See Also:
-
setPopupOffsetY
public void setPopupOffsetY(double popupOffsetY) Sets the value of the property popupOffsetY.- Property description:
- Specifies the popup's y offset.
-
getLocale
Gets the value of the property locale.- Property description:
- Specifies the
Localeused by this date picker. The Locale is mainly responsible for changing the language and the grid disposition (different week start for example)
-
localeProperty
Specifies theLocaleused by this date picker. The Locale is mainly responsible for changing the language and the grid disposition (different week start for example)- See Also:
-
setLocale
Sets the value of the property locale.- Property description:
- Specifies the
Localeused by this date picker. The Locale is mainly responsible for changing the language and the grid disposition (different week start for example)
-
getValue
Gets the value of the property value.- Property description:
- Specifies the current selected date.
-
valueProperty
Specifies the current selected date.- See Also:
-
setValue
Sets the value of the property value.- Property description:
- Specifies the current selected date.
-
getConverterSupplier
Gets the value of the property converterSupplier.- Property description:
- Specifies the
Supplierused to create aStringConvertercapable of convertingLocalDates.
-
converterSupplierProperty
-
setConverterSupplier
Sets the value of the property converterSupplier.- Property description:
- Specifies the
Supplierused to create aStringConvertercapable of convertingLocalDates.
-
getMonthConverterSupplier
Gets the value of the property monthConverterSupplier.- Property description:
- Specifies the
Supplierused to create aStringConvertercapable of convertingMonths.
-
monthConverterSupplierProperty
-
setMonthConverterSupplier
Sets the value of the property monthConverterSupplier.- Property description:
- Specifies the
Supplierused to create aStringConvertercapable of convertingMonths.
-
getDayOfWeekConverterSupplier
Gets the value of the property dayOfWeekConverterSupplier.- Property description:
- Specifies the
Supplierused to create aStringConvertercapable of convertingDayOfWeeks.
-
dayOfWeekConverterSupplierProperty
-
setDayOfWeekConverterSupplier
public void setDayOfWeekConverterSupplier(Supplier<StringConverter<DayOfWeek>> dayOfWeekConverterSupplier) Sets the value of the property dayOfWeekConverterSupplier.- Property description:
- Specifies the
Supplierused to create aStringConvertercapable of convertingDayOfWeeks.
-
getOnCommit
Gets the value of the property onCommit.- Property description:
- Specifies the action to perform on
commit(String).
-
onCommitProperty
Specifies the action to perform oncommit(String).- See Also:
-
setOnCommit
Sets the value of the property onCommit.- Property description:
- Specifies the action to perform on
commit(String).
-
getOnCancel
Gets the value of the property onCancel.- Property description:
- Specifies the action to perform on
cancel(String).
-
onCancelProperty
Specifies the action to perform oncancel(String).- See Also:
-
setOnCancel
Sets the value of the property onCancel.- Property description:
- Specifies the action to perform on
cancel(String).
-
getCellFactory
Gets the value of the property cellFactory.- Property description:
- Specifies the function used to create the day cells in the grid.
-
cellFactoryProperty
Specifies the function used to create the day cells in the grid.- See Also:
-
setCellFactory
Sets the value of the property cellFactory.- Property description:
- Specifies the function used to create the day cells in the grid.
-
getCurrentDate
Gets the value of the property currentDate.- Property description:
- Specifies the current date.
-
currentDateProperty
Specifies the current date.- See Also:
-
updateCurrentDate
public void updateCurrentDate()Updates the current date property withLocalDate.now() -
getYearsRange
Gets the value of the property yearsRange.- Property description:
- Specifies the years range of the date picker.
-
yearsRangeProperty
Specifies the years range of the date picker.- See Also:
-
setYearsRange
Sets the value of the property yearsRange.- Property description:
- Specifies the years range of the date picker.
-
getGridAlgorithm
Gets the value of the property gridAlgorithm.- Property description:
- Specifies the
BiFunctionused to generate the month grid which is a bi-dimensional array of integer values.
-
gridAlgorithmProperty
Specifies theBiFunctionused to generate the month grid which is a bi-dimensional array of integer values. -
setGridAlgorithm
Sets the value of the property gridAlgorithm.- Property description:
- Specifies the
BiFunctionused to generate the month grid which is a bi-dimensional array of integer values.
-
getStartingYearMonth
- Returns:
- the date picker's starting
YearMonth
-
setStartingYearMonth
Sets theYearMonthat which the date picker will start.Note that this will be relevant only for the first initialization. Setting this afterwards won't take any effect.
-
isClosePopupOnChange
public boolean isClosePopupOnChange()- Returns:
- whether the popup should stay open on value change or close
-
setClosePopupOnChange
public void setClosePopupOnChange(boolean closePopupOnChange)
-