Calendar
flaui.core.automation_elements.Calendar
Bases: AutomationElement
Class to interact with a calendar element. Not supported for Windows Forms calendar
selected_dates
property
Gets the selected dates in the calendar. For Win32 multiple selection calendar the returned array has two dates, the first date and the last date of the selected range. For WPF calendar the returned array contains all selected dates
Returns:
| Type | Description |
|---|---|
List[date]
|
Selected dates |
add_range_to_selection(dates)
For WPF calendar with SelectionMode="MultipleRange" this method adds the specified range to current selection. For any other type of SelectionMode it deselects other selected dates and selects only the last date in the range. This method is supported only for WPF calendar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dates
|
List[date]
|
Date ranges |
required |
Source code in flaui/core/automation_elements.py
add_to_selection(date)
For WPF calendar with SelectionMode="MultipleRange" this method adds the specified date to current selection. For any other type of SelectionMode it deselects other selected dates and selects the specified date. This method is supported only for WPF calendar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
date
|
Date object |
required |
Source code in flaui/core/automation_elements.py
select_date(date)
Deselects other selected dates and selects the specified date.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
date
|
Date object |
required |
Source code in flaui/core/automation_elements.py
select_range(dates)
For WPF calendar with SelectionMode="MultipleRange" this method deselects other selected dates and selects the specified range. For any other type of SelectionMode it deselects other selected dates and selects only the last date in the range. For Win32 multiple selection calendar the "dates" parameter should contain two dates, the first and the last date of the range to be selected. For Win32 single selection calendar this method selects only the second date from the "dates" array. For WPF calendar all dates should be specified in the "dates" parameter, not only the first and the last date of the range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dates
|
List[date]
|
Date ranges |
required |