Skip to content

DatePickerNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

Render node for . Wraps a trigger and manages the multi-step picker state (year → month → calendar). Delegates layout, rendering, and focus traversal to the child button.

csharp
public sealed class DatePickerNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → DatePickerNode

Properties ​

Child ​

The child button node (trigger field).

Returns: Hex1bNode

csharp
public Hex1bNode? Child { get; set; }

DateFormat ​

Format string for displaying the selected date.

Returns: String

csharp
public string? DateFormat { get; set; }

DisplayMonth ​

The month (1-12) being viewed in the calendar step.

Returns: Int32

csharp
public int DisplayMonth { get; set; }

DisplayYear ​

The year being viewed in the month/calendar steps.

Returns: Int32

csharp
public int DisplayYear { get; set; }

HasAppliedInitialDate ​

Whether the initial date has been applied from the widget.

Returns: Boolean

csharp
public bool HasAppliedInitialDate { get; set; }

IsFocusable ​

Returns true if this node can receive focus.

Returns: Boolean

csharp
public override bool IsFocusable { get; }

SelectedDate ​

The currently selected date, or null if no date is selected.

Returns: Nullable<DateOnly>

csharp
public DateOnly? SelectedDate { get; set; }

SourceWidget ​

The source widget that was reconciled into this node.

Returns: DatePickerWidget

csharp
public DatePickerWidget? SourceWidget { get; set; }

Step ​

The current step in the picker flow.

Returns: PickerStep

csharp
public PickerStep Step { get; set; }

YearFocusCellIndex ​

Cell index (0–11) to focus after a year page change, or null for default targeting. Cleared after each rebuild so it only applies once.

Returns: Nullable<Int32>

csharp
public int? YearFocusCellIndex { get; set; }

YearPageStart ​

The first year shown on the current year grid page.

Returns: Int32

csharp
public int YearPageStart { get; set; }

Methods ​

ArrangeCore(Rect) ​

Override this method to implement arranging logic for this node. The base implementation saves previous bounds, marks dirty on change, and sets bounds.

Parameters:

csharp
protected override void ArrangeCore(Rect bounds)

GetChildren() ​

Gets the direct children of this node for structural tree traversal. Container nodes should override this to return their children.

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetChildren()

GetDisplayText(string?) ​

Gets the display text for the trigger field.

Parameters:

Returns: String

csharp
public string GetDisplayText(string? placeholder)

GetFocusableNodes() ​

Gets all focusable nodes in this subtree (including this node if focusable).

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetFocusableNodes()

GoBack() ​

Goes back one step. Returns false if already at the year step (caller should dismiss the popup).

Returns: Boolean

csharp
public bool GoBack()

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

PageYearsBackward() ​

Moves the year page backward by 12 years.

csharp
public void PageYearsBackward()

PageYearsForward() ​

Moves the year page forward by 12 years.

csharp
public void PageYearsForward()

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

ResetStep() ​

Resets the picker to the year step for the next popup open.

csharp
public void ResetStep()

SelectMonth(int) ​

Advances from the month step to the calendar step.

Parameters:

csharp
public void SelectMonth(int month)

SelectYear(int) ​

Advances from the year step to the month step.

Parameters:

csharp
public void SelectYear(int year)

Released under the MIT License.