Skip to content

DatePickerExtensions

Namespace: Hex1b

Assembly: Hex1b.dll

Extension methods for creating instances using the fluent builder API.

csharp
public static class DatePickerExtensions

Inheritance

ObjectDatePickerExtensions

Methods

DatePicker<TParent>(WidgetContext<TParent>, DateOnly)

Creates a date picker widget with an initial selected date.

Parameters:

  • ctx (WidgetContext<<TParent>>):
  • initialDate (DateOnly):

Returns: DatePickerWidget

csharp
public static DatePickerWidget DatePicker<TParent>(this WidgetContext<TParent> ctx, DateOnly initialDate) where TParent : Hex1bWidget

DatePicker<TParent>(WidgetContext<TParent>)

Creates a date picker widget with no initial date.

Parameters:

  • ctx (WidgetContext<<TParent>>):

Returns: DatePickerWidget

csharp
public static DatePickerWidget DatePicker<TParent>(this WidgetContext<TParent> ctx) where TParent : Hex1bWidget

FirstDayOfWeek(DatePickerWidget, DayOfWeek)

Sets the first day of the week for the calendar step.

Parameters:

Returns: DatePickerWidget

csharp
public static DatePickerWidget FirstDayOfWeek(this DatePickerWidget widget, DayOfWeek firstDay)

Format(DatePickerWidget, string)

Sets the format string for displaying the selected date. Uses .NET date format strings (e.g. "yyyy-MM-dd", "MMMM d, yyyy").

Parameters:

Returns: DatePickerWidget

csharp
public static DatePickerWidget Format(this DatePickerWidget widget, string format)

Placeholder(DatePickerWidget, string)

Sets the placeholder text shown when no date is selected.

Parameters:

Returns: DatePickerWidget

csharp
public static DatePickerWidget Placeholder(this DatePickerWidget widget, string placeholder)

Released under the MIT License.