DatePicker
class in package klyn.gui.windows

    public class DatePicker extends Widget:

Widget
└ DatePicker

Themed date selection field with a calendar popup.

The widget behaves like a combo box whose popup lets the user choose a date. `value` is a signal property, so it can be bound or watched directly. Enable `quickEditMode` when the expected workflow is year, then month, then day.

    import klyn.gui.windows
    import klyn.time

    picker = DatePicker(DateTime(year=2026, month=6, day=14))
    picker.quickEditMode = true
    Binding.watch(picker::value, lambda(value: Object): print(value))

Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | buttonAreaWidth `buttonAreaWidth as Int = 42` | Width reserved for the calendar button at the right side of the field.
public property | isExpanded `isExpanded as Boolean = false` | Whether the popup is currently visible.
public property | paddingX `paddingX as Int = 12` | Horizontal text padding inside the collapsed field.
public property | quickEditMode `quickEditMode as Boolean = false` | Enables the three-click picker: year, month, then day.

Inherited Properties
property Inherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Signals

Modifier and Type | Member | Description
--- | --- | ---
public signal property | value `value as DateTime:` | Selected date.

Events

Modifier and Type | Member | Description
--- | --- | ---
public event | dateChanged `dateChanged as ActionEvent` | Event emitted after the selected date changes.

Inherited Events
event Inherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | DatePicker `DatePicker(value as DateTime = null):` | Creates a date picker.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | collapse `collapse() as Boolean:` | Closes the calendar popup.
public | expand `expand() as Boolean:` | Opens the calendar popup.
public override | paint `paint(painter as Painter) as Void:` | Paints the collapsed field.
public override | paintOverlay `paintOverlay(painter as Painter) as Void:` | Paints the calendar popup above the regular widget tree.
public | popupContainsPoint `popupContainsPoint(x as Int, y as Int) as Boolean:` | Returns true when a point falls inside the open popup.
public override | resolvePreferredHeight `resolvePreferredHeight() as Int:` | Resolved preferred height after runtime content zoom.
public override | resolvePreferredWidth `resolvePreferredWidth() as Int:` | Resolved preferred width after runtime content zoom.
public | toggleExpanded `toggleExpanded() as Boolean:` | Toggles the calendar popup.

Inherited Methods
method Inherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds