CalendarDatePicker
struct · ferroui-controls · v0.5.0
struct CalendarDatePicker
A control to allow the user to select a date.
Members
TYPEto_refon_date_validation_errordisplay_date_propertydisplay_date_start_propertydisplay_date_end_propertyfirst_day_of_week_propertyis_drop_down_open_propertyis_today_highlighted_propertyselected_date_propertyselected_date_format_propertycustom_date_format_string_propertytext_converter_propertytext_propertyplaceholder_text_propertyuse_floating_placeholder_propertyplaceholder_foreground_propertyhorizontal_content_alignment_propertyvertical_content_alignment_propertyis_week_number_visible_propertyweek_number_rule_propertywatermark_propertyuse_floating_watermark_propertywatermark_foreground_propertyconstructnewblackout_datesdisplay_dateset_display_datedisplay_date_startset_display_date_startdisplay_date_endset_display_date_endfirst_day_of_weekset_first_day_of_weekis_drop_down_openset_is_drop_down_openis_today_highlightedset_is_today_highlightedselected_dateset_selected_dateselected_date_formatset_selected_date_formatcustom_date_format_stringset_custom_date_format_stringtext_converterset_text_convertertextset_textplaceholder_textset_placeholder_textwatermarkset_watermarkuse_floating_placeholderset_use_floating_placeholderuse_floating_watermarkset_use_floating_watermarkplaceholder_foregroundset_placeholder_foregroundwatermark_foregroundset_watermark_foregroundhorizontal_content_alignmentset_horizontal_content_alignmentvertical_content_alignmentset_vertical_content_alignmentis_week_number_visibleset_is_week_number_visibleweek_number_ruleset_week_number_rulecalendar_closedcalendar_openeddate_validation_errorselected_date_changedupdate_pseudo_classesclear
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<CalendarDatePicker>
Returns a strong reference to this object.
on_date_validation_error
fn on_date_validation_error(self: &Self, e: &CalendarDatePickerDateValidationErrorEventArgs)
Raises the DateValidationError event.
display_date_property
fn display_date_property() -> &'static StyledProperty<DateTime>
Defines the DisplayDate property.
display_date_start_property
fn display_date_start_property() -> &'static StyledProperty<Option<DateTime>>
Defines the DisplayDateStart property.
display_date_end_property
fn display_date_end_property() -> &'static StyledProperty<Option<DateTime>>
Defines the DisplayDateEnd property.
first_day_of_week_property
fn first_day_of_week_property() -> &'static StyledProperty<DayOfWeek>
Defines the FirstDayOfWeek property.
is_drop_down_open_property
fn is_drop_down_open_property() -> &'static StyledProperty<bool>
Defines the IsDropDownOpen property.
is_today_highlighted_property
fn is_today_highlighted_property() -> &'static StyledProperty<bool>
Defines the IsTodayHighlighted property.
selected_date_property
fn selected_date_property() -> &'static StyledProperty<Option<DateTime>>
Defines the SelectedDate property.
selected_date_format_property
fn selected_date_format_property() -> &'static StyledProperty<CalendarDatePickerFormat>
Defines the SelectedDateFormat property.
custom_date_format_string_property
fn custom_date_format_string_property() -> &'static StyledProperty<String>
Defines the CustomDateFormatString property.
text_converter_property
fn text_converter_property() -> &'static StyledProperty<Option<Rc<dyn IValueConverter>>>
Defines the TextConverter property.
text_property
fn text_property() -> &'static StyledProperty<Option<String>>
Defines the Text property.
placeholder_text_property
fn placeholder_text_property() -> &'static StyledProperty<Option<String>>
Defines the PlaceholderText property.
use_floating_placeholder_property
fn use_floating_placeholder_property() -> &'static StyledProperty<bool>
Defines the UseFloatingPlaceholder property.
placeholder_foreground_property
fn placeholder_foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
Defines the PlaceholderForeground property.
horizontal_content_alignment_property
fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
Defines the HorizontalContentAlignment property.
vertical_content_alignment_property
fn vertical_content_alignment_property() -> &'static StyledProperty<VerticalAlignment>
Defines the VerticalContentAlignment property.
is_week_number_visible_property
fn is_week_number_visible_property() -> &'static StyledProperty<bool>
Defines the IsWeekNumberVisible property.
week_number_rule_property
fn week_number_rule_property() -> &'static StyledProperty<CalendarWeekRule>
Defines the WeekNumberRule property.
watermark_property
fn watermark_property() -> &'static StyledProperty<Option<String>>
Defines the Watermark property.
Deprecated. Use placeholder_text_property instead.
use_floating_watermark_property
fn use_floating_watermark_property() -> &'static StyledProperty<bool>
Defines the UseFloatingWatermark property.
Deprecated. Use use_floating_placeholder_property instead.
watermark_foreground_property
fn watermark_foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
Defines the WatermarkForeground property.
Deprecated. Use placeholder_foreground_property instead.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Initializes a new instance of the CalendarDatePicker class.
blackout_dates
fn blackout_dates(self: &Self) -> Option<CalendarBlackoutDatesCollection>
Gets a collection of dates that are marked as not selectable: the
collection of the calendar of the template, None before a
template with a calendar is applied.
display_date
fn display_date(self: &Self) -> DateTime
Gets or sets the date to display.
set_display_date
fn set_display_date(self: &Self, value: DateTime)
display_date_start
fn display_date_start(self: &Self) -> Option<DateTime>
Gets or sets the first date to be displayed.
set_display_date_start
fn set_display_date_start(self: &Self, value: Option<DateTime>)
display_date_end
fn display_date_end(self: &Self) -> Option<DateTime>
Gets or sets the last date to be displayed.
set_display_date_end
fn set_display_date_end(self: &Self, value: Option<DateTime>)
first_day_of_week
fn first_day_of_week(self: &Self) -> DayOfWeek
Gets or sets the day that is considered the beginning of the week.
set_first_day_of_week
fn set_first_day_of_week(self: &Self, value: DayOfWeek)
is_drop_down_open
fn is_drop_down_open(self: &Self) -> bool
Gets or sets a value indicating whether the drop-down calendar is open or closed.
set_is_drop_down_open
fn set_is_drop_down_open(self: &Self, value: bool)
is_today_highlighted
fn is_today_highlighted(self: &Self) -> bool
Gets or sets a value indicating whether the current date will be highlighted.
set_is_today_highlighted
fn set_is_today_highlighted(self: &Self, value: bool)
selected_date
fn selected_date(self: &Self) -> Option<DateTime>
Gets or sets the currently selected date. The default is None.
Setting it panics when the date is in the blackout dates.
set_selected_date
fn set_selected_date(self: &Self, value: Option<DateTime>)
selected_date_format
fn selected_date_format(self: &Self) -> CalendarDatePickerFormat
Gets or sets the format that is used to display the selected date.
set_selected_date_format
fn set_selected_date_format(self: &Self, value: CalendarDatePickerFormat)
custom_date_format_string
fn custom_date_format_string(self: &Self) -> String
Gets or sets the format string of the custom date format.
set_custom_date_format_string
fn set_custom_date_format_string(self: &Self, value: &str)
text_converter
fn text_converter(self: &Self) -> Option<Rc<dyn IValueConverter>>
Gets or sets the converter between a date and its text. With a converter the date format and the custom format string are not used.
set_text_converter
fn set_text_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
text
fn text(self: &Self) -> Option<String>
Gets or sets the text that is displayed by the date picker.
Setting a text that is not in an acceptable format raises the
DateValidationError event (and panics when a handler asks for the
exception to be thrown).
set_text
fn set_text(self: &Self, value: Option<&str>)
placeholder_text
fn placeholder_text(self: &Self) -> Option<String>
Gets or sets the placeholder text.
set_placeholder_text
fn set_placeholder_text(self: &Self, value: Option<&str>)
watermark
fn watermark(self: &Self) -> Option<String>
Gets or sets the placeholder text.
Deprecated. Use placeholder_text instead.
set_watermark
fn set_watermark(self: &Self, value: Option<&str>)
Deprecated. Use set_placeholder_text instead.
use_floating_placeholder
fn use_floating_placeholder(self: &Self) -> bool
Gets or sets a value indicating whether the placeholder floats above the text.
set_use_floating_placeholder
fn set_use_floating_placeholder(self: &Self, value: bool)
use_floating_watermark
fn use_floating_watermark(self: &Self) -> bool
Gets or sets a value indicating whether the placeholder floats above the text.
Deprecated. Use use_floating_placeholder instead.
set_use_floating_watermark
fn set_use_floating_watermark(self: &Self, value: bool)
Deprecated. Use set_use_floating_placeholder instead.
placeholder_foreground
fn placeholder_foreground(self: &Self) -> Option<Rc<dyn IBrush>>
Gets or sets the brush used for the foreground color of the placeholder text.
set_placeholder_foreground
fn set_placeholder_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
watermark_foreground
fn watermark_foreground(self: &Self) -> Option<Rc<dyn IBrush>>
Gets or sets the brush used for the foreground color of the placeholder text.
Deprecated. Use placeholder_foreground instead.
set_watermark_foreground
fn set_watermark_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
Deprecated. Use set_placeholder_foreground instead.
horizontal_content_alignment
fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
Gets or sets the horizontal alignment of the content within the control.
set_horizontal_content_alignment
fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
vertical_content_alignment
fn vertical_content_alignment(self: &Self) -> VerticalAlignment
Gets or sets the vertical alignment of the content within the control.
set_vertical_content_alignment
fn set_vertical_content_alignment(self: &Self, value: VerticalAlignment)
is_week_number_visible
fn is_week_number_visible(self: &Self) -> bool
Gets or sets a value indicating whether week numbers are shown in the calendar popup.
set_is_week_number_visible
fn set_is_week_number_visible(self: &Self, value: bool)
week_number_rule
fn week_number_rule(self: &Self) -> CalendarWeekRule
Gets or sets the rule used to determine the first week of the year for week number display. The default is taken from the culture that was current when the calendar class was initialised.
set_week_number_rule
fn set_week_number_rule(self: &Self, value: CalendarWeekRule)
calendar_closed
fn calendar_closed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Occurs when the drop-down Calendar is closed.
Dropping the returned guard removes the handler; Subscription::detach keeps it for the
life of the picker.
calendar_opened
fn calendar_opened(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Occurs when the drop-down Calendar is opened.
Dropping the returned guard removes the handler; Subscription::detach keeps it for the
life of the picker.
date_validation_error
fn date_validation_error(self: &Self, handler: impl Fn(&CalendarDatePickerDateValidationErrorEventArgs) -> () + 'static) -> Subscription
Occurs when the text is assigned a value that cannot be interpreted as a date.
Dropping the returned guard removes the handler; Subscription::detach keeps it for the
life of the picker.
selected_date_changed
fn selected_date_changed(self: &Self, handler: impl Fn(&SelectionChangedEventArgs) -> () + 'static) -> Subscription
Occurs when the selected date is changed.
Dropping the returned guard removes the handler; Subscription::detach keeps it for the
life of the picker.
update_pseudo_classes
fn update_pseudo_classes(self: &Self)
Updates the visual state of the control by applying the latest pseudo classes.
clear
fn clear(self: &Self)
Clear the date picker.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtCalendarDatePickerImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<CalendarDatePicker>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplVisualImplLayoutableImplInteractiveImplFerroObjectImplInputElementImplTemplatedControlImplControlImplCalendarDatePickerImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.