javafx.scene.control.DatePicker that
ships with JavaFX. The month view that the user can bring up by clicking on the button on the right-hand
side of this control is an instance of CalendarView, which is more powerful than the normal view
used by javafx.scene.control.DatePicker . The CalendarView allows the user to directly jump
to a specific month or year.
| Modifier and Type | Field and Description |
|---|---|
| private CalendarView | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final TextField |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public final ObjectProperty | Returns: the converter objectA converter used to translate a text into a YearMonth object and vice versa. |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final ObjectProperty | Returns: a callback that determines the selection ability of each date based on custom criteria.A property to define a filter for determining which dates in the calendar can be selected. |
| public CalendarView | Returns: the calendar view for picking a dateReturns the view used to display dates when the picker is opening up. |
| public final StringConverter | |
| public final Callback | |
| public final TextField | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| private void | |
| public final void | |
| public final void | |
| private void |
| calendarView | back to summary |
|---|---|
| private CalendarView calendarView | |
| converter | back to summary |
|---|---|
| private final ObjectProperty<StringConverter<LocalDate>> converter | |
| dateFilter | back to summary |
|---|---|
| private final ObjectProperty<Callback<LocalDate, Boolean>> dateFilter | |
| editor | back to summary |
|---|---|
| private final TextField editor | |
| CalendarPicker | back to summary |
|---|---|
| public CalendarPicker() Constructs a new calendar picker. | |
| commitValue | back to summary |
|---|---|
| private void commitValue() | |
| commitValueAndShow | back to summary |
|---|---|
| private void commitValueAndShow() | |
| converterProperty | back to summary |
|---|---|
| public final ObjectProperty A converter used to translate a text into a YearMonth object and vice versa.
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| dateFilterProperty | back to summary |
|---|---|
| public final ObjectProperty 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
| |
| getCalendarView | back to summary |
|---|---|
| public CalendarView getCalendarView() Returns the view used to display dates when the picker is opening up. This method can be overridden
to return a customized version of a
| |
| getConverter | back to summary |
|---|---|
| public final StringConverter | |
| getDateFilter | back to summary |
|---|---|
| public final Callback | |
| getEditor | back to summary |
|---|---|
| public final TextField getEditor() Returns the text field control used for manual input.
| |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides javafx. Doc from javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls. The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.
For additional information about using CSS with the scene graph,
see the CSS Reference Guide.
| |
| placeCaretAtEnd | back to summary |
|---|---|
| private void placeCaretAtEnd() | |
| setConverter | back to summary |
|---|---|
| public final void setConverter(StringConverter<LocalDate> converter) | |
| setDateFilter | back to summary |
|---|---|
| public final void setDateFilter(Callback<LocalDate, Boolean> dateFilter) | |
| updateTextAndHidePopup | back to summary |
|---|---|
| private void updateTextAndHidePopup() | |