xtd 0.2.0
Loading...
Searching...
No Matches

◆ selection_end() [1/2]

xtd::date_time xtd::forms::month_calendar::selection_end ( ) const
noexcept

Gets the end date of the selected range of dates.

Returns
A xtd::date_time indicating the last date in the selection range.
Remarks
If you set the value of the xtd::forms::month_calendar::selection_end property to a date that is earlier than the current value of the xtd::forms::month_calendar::selection_start property, xtd::forms::month_calendar::selection_start is automatically set equal to xtd::forms::month_calendar::selection_end.
If you set a date in xtd::forms::month_calendar::selection_end that causes the selection to exceed the number of days specified by the xtd::forms::month_calendar::max_selection_count property, the value of xtd::forms::month_calendar::selection_start is adjusted; xtd::forms::month_calendar::selection_start is automatically set so that the number of days selected is equal to xtd::forms::month_calendar::max_selection_count.
Note
xtd::forms::month_calendar::max_selection_count represents the number of days in the selection, not the difference between xtd::forms::month_calendar::selection_start and xtd::forms::month_calendar::selection_end. For example, if xtd::forms::month_calendar::max_selection_count is 7 (the default), then xtd::forms::month_calendar::selection_start and xtd::forms::month_calendar::selection_end can be no more than six days apart.
Setting the xtd::forms::month_calendar::selection_range for a xtd::forms::month_calendar control that has visual styles enabled will result in the selection range not painting correctly on the control.