FuncUI
GitHub Repository
  • Getting Started
  • View Basics
    • Creating views
    • Lifetime
    • Attributes
    • How to create bindings
  • Components
    • Component basics
    • Component lifetime
    • Hooks
  • Common Questions
  • Controls
    • Button
    • Border
    • Calendar
    • CalendarDatePicker
    • CheckBox
    • DatePicker
    • DockPanel
    • Expander
    • ListBox
    • Menu
    • NativeMenu
    • NumericUpDown
    • ProgressBar
    • RadioButton
    • RepeatButton
    • Slider
    • StackPanel
    • Tabs
    • TextBlock
    • TextBox
    • TimePicker
    • ToggleButton
    • ToggleSwitch
Powered by GitBook
On this page
  1. Controls

Calendar

Last updated 2 years ago

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

For Avalonia.FuncUI's DSL properties you can check

The Calendar control is a standard Calendar control for users to select date(s) or date ranges.

Usage

Set a Date

If no calendar date is set, it will default to today's date.

Calendar.create [
  Calendar.selectedDate DateTime.Today
]

Select Multiple Dates

For more information about selection modes you can see the but more verbosely you can look at the for a better description of what they do.

Calendar.create [
  Calendar.selectionMode SelectionMode.Multiple
]

Select Calendar Month First

You can change the so that you can select the year first with CalendarMode.Decade, the month first with CalendarMode.Year, or have the standard (default) format with CalendarMode.Month.jok

Calendar.create [
  Calendar.displayMode CalendarMode.Decade
]

Display Only the Upcoming Week

Calendar.create [
  Calendar.displayDateStart DateTime.Today
  Calendar.displayDateEnd (DateTime.Today + TimeSpan(7, 0, 0, 0, 0)) // TimeSpan constructor for 7 days
]
Calendar
Calendar API
Calendar.fs
SelectionModes API
ListBox Selection Modes
CalendarMode