FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CalendarDatePicker

    struct · ferroui-controls · v0.5.0

    struct CalendarDatePicker
    

    A control to allow the user to select a date.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<CalendarDatePicker>
    

    Returns a strong reference to this object.

    Source

    on_date_validation_error

    fn on_date_validation_error(self: &Self, e: &CalendarDatePickerDateValidationErrorEventArgs)
    

    Raises the DateValidationError event.

    Source

    display_date_property

    fn display_date_property() -> &'static StyledProperty<DateTime>
    

    Defines the DisplayDate property.

    Source

    display_date_start_property

    fn display_date_start_property() -> &'static StyledProperty<Option<DateTime>>
    

    Defines the DisplayDateStart property.

    Source

    display_date_end_property

    fn display_date_end_property() -> &'static StyledProperty<Option<DateTime>>
    

    Defines the DisplayDateEnd property.

    Source

    first_day_of_week_property

    fn first_day_of_week_property() -> &'static StyledProperty<DayOfWeek>
    

    Defines the FirstDayOfWeek property.

    Source

    is_drop_down_open_property

    fn is_drop_down_open_property() -> &'static StyledProperty<bool>
    

    Defines the IsDropDownOpen property.

    Source

    is_today_highlighted_property

    fn is_today_highlighted_property() -> &'static StyledProperty<bool>
    

    Defines the IsTodayHighlighted property.

    Source

    selected_date_property

    fn selected_date_property() -> &'static StyledProperty<Option<DateTime>>
    

    Defines the SelectedDate property.

    Source

    selected_date_format_property

    fn selected_date_format_property() -> &'static StyledProperty<CalendarDatePickerFormat>
    

    Defines the SelectedDateFormat property.

    Source

    custom_date_format_string_property

    fn custom_date_format_string_property() -> &'static StyledProperty<String>
    

    Defines the CustomDateFormatString property.

    Source

    text_converter_property

    fn text_converter_property() -> &'static StyledProperty<Option<Rc<dyn IValueConverter>>>
    

    Defines the TextConverter property.

    Source

    text_property

    fn text_property() -> &'static StyledProperty<Option<String>>
    

    Defines the Text property.

    Source

    placeholder_text_property

    fn placeholder_text_property() -> &'static StyledProperty<Option<String>>
    

    Defines the PlaceholderText property.

    Source

    use_floating_placeholder_property

    fn use_floating_placeholder_property() -> &'static StyledProperty<bool>
    

    Defines the UseFloatingPlaceholder property.

    Source

    placeholder_foreground_property

    fn placeholder_foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the PlaceholderForeground property.

    Source

    horizontal_content_alignment_property

    fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
    

    Defines the HorizontalContentAlignment property.

    Source

    vertical_content_alignment_property

    fn vertical_content_alignment_property() -> &'static StyledProperty<VerticalAlignment>
    

    Defines the VerticalContentAlignment property.

    Source

    is_week_number_visible_property

    fn is_week_number_visible_property() -> &'static StyledProperty<bool>
    

    Defines the IsWeekNumberVisible property.

    Source

    week_number_rule_property

    fn week_number_rule_property() -> &'static StyledProperty<CalendarWeekRule>
    

    Defines the WeekNumberRule property.

    Source

    watermark_property

    fn watermark_property() -> &'static StyledProperty<Option<String>>
    

    Defines the Watermark property.

    Deprecated. Use placeholder_text_property instead.

    Source

    use_floating_watermark_property

    fn use_floating_watermark_property() -> &'static StyledProperty<bool>
    

    Defines the UseFloatingWatermark property.

    Deprecated. Use use_floating_placeholder_property instead.

    Source

    watermark_foreground_property

    fn watermark_foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the WatermarkForeground property.

    Deprecated. Use placeholder_foreground_property instead.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Initializes a new instance of the CalendarDatePicker class.

    Source

    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.

    Source

    display_date

    fn display_date(self: &Self) -> DateTime
    

    Gets or sets the date to display.

    Source

    set_display_date

    fn set_display_date(self: &Self, value: DateTime)
    

    Source

    display_date_start

    fn display_date_start(self: &Self) -> Option<DateTime>
    

    Gets or sets the first date to be displayed.

    Source

    set_display_date_start

    fn set_display_date_start(self: &Self, value: Option<DateTime>)
    

    Source

    display_date_end

    fn display_date_end(self: &Self) -> Option<DateTime>
    

    Gets or sets the last date to be displayed.

    Source

    set_display_date_end

    fn set_display_date_end(self: &Self, value: Option<DateTime>)
    

    Source

    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.

    Source

    set_first_day_of_week

    fn set_first_day_of_week(self: &Self, value: DayOfWeek)
    

    Source

    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.

    Source

    set_is_drop_down_open

    fn set_is_drop_down_open(self: &Self, value: bool)
    

    Source

    is_today_highlighted

    fn is_today_highlighted(self: &Self) -> bool
    

    Gets or sets a value indicating whether the current date will be highlighted.

    Source

    set_is_today_highlighted

    fn set_is_today_highlighted(self: &Self, value: bool)
    

    Source

    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.

    Source

    set_selected_date

    fn set_selected_date(self: &Self, value: Option<DateTime>)
    

    Source

    selected_date_format

    fn selected_date_format(self: &Self) -> CalendarDatePickerFormat
    

    Gets or sets the format that is used to display the selected date.

    Source

    set_selected_date_format

    fn set_selected_date_format(self: &Self, value: CalendarDatePickerFormat)
    

    Source

    custom_date_format_string

    fn custom_date_format_string(self: &Self) -> String
    

    Gets or sets the format string of the custom date format.

    Source

    set_custom_date_format_string

    fn set_custom_date_format_string(self: &Self, value: &str)
    

    Source

    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.

    Source

    set_text_converter

    fn set_text_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
    

    Source

    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).

    Source

    set_text

    fn set_text(self: &Self, value: Option<&str>)
    

    Source

    placeholder_text

    fn placeholder_text(self: &Self) -> Option<String>
    

    Gets or sets the placeholder text.

    Source

    set_placeholder_text

    fn set_placeholder_text(self: &Self, value: Option<&str>)
    

    Source

    watermark

    fn watermark(self: &Self) -> Option<String>
    

    Gets or sets the placeholder text.

    Deprecated. Use placeholder_text instead.

    Source

    set_watermark

    fn set_watermark(self: &Self, value: Option<&str>)
    

    Deprecated. Use set_placeholder_text instead.

    Source

    use_floating_placeholder

    fn use_floating_placeholder(self: &Self) -> bool
    

    Gets or sets a value indicating whether the placeholder floats above the text.

    Source

    set_use_floating_placeholder

    fn set_use_floating_placeholder(self: &Self, value: bool)
    

    Source

    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.

    Source

    set_use_floating_watermark

    fn set_use_floating_watermark(self: &Self, value: bool)
    

    Deprecated. Use set_use_floating_placeholder instead.

    Source

    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.

    Source

    set_placeholder_foreground

    fn set_placeholder_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    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.

    Source

    set_watermark_foreground

    fn set_watermark_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Deprecated. Use set_placeholder_foreground instead.

    Source

    horizontal_content_alignment

    fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
    

    Gets or sets the horizontal alignment of the content within the control.

    Source

    set_horizontal_content_alignment

    fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
    

    Source

    vertical_content_alignment

    fn vertical_content_alignment(self: &Self) -> VerticalAlignment
    

    Gets or sets the vertical alignment of the content within the control.

    Source

    set_vertical_content_alignment

    fn set_vertical_content_alignment(self: &Self, value: VerticalAlignment)
    

    Source

    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.

    Source

    set_is_week_number_visible

    fn set_is_week_number_visible(self: &Self, value: bool)
    

    Source

    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.

    Source

    set_week_number_rule

    fn set_week_number_rule(self: &Self, value: CalendarWeekRule)
    

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    update_pseudo_classes

    fn update_pseudo_classes(self: &Self)
    

    Updates the visual state of the control by applying the latest pseudo classes.

    Source

    clear

    fn clear(self: &Self)
    

    Clear the date picker.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.