TimePicker

Note: You can check the Avalonia docs for the TimePicker and TimePicker API if you need more information.

For Avalonia.FuncUI's DSL properties you can check TimePicker.fs

The TimePicker control allows the user to pick a time value.

Usage

Create a TimePicker

TimePicker.create [
    TimePicker.header "Arrival Time"
]

Change in 15 Minute Increments

TimePicker.create [
    TimePicker.header "Arrival Time"
    TimePicker.minuteIncrement 15
]

Choose a 12 or 24 Hour Clock

For more information about the attribute values here you can check out the documentation for TimeSpan and the ClockIdentifier.

TimePicker.create [
    TimePicker.header "12 Hour Clock"
    TimePicker.selectedTime (TimeSpan(14, 30, 0))
    TimePicker.clockIdentifier "12HourClock"
]

TimePicker.create [
    TimePicker.header "24 Hour Clock"
    TimePicker.selectedTime (TimeSpan(14, 30, 0))
    TimePicker.clockIdentifier "24HourClock"
]

Last updated