DateRangePicker

This control is used to display and edit date range quickly.

Inherits from Catel.Windows.Controls.UserControl.

DateRangePicker consist of two DateTimePickers to specify start end date of date range and one TimeSpanPicker to display/change range itself.

DateRangePicker_01

Properties

Property name Description
AllowCopyPaste Gets or sets whether copy/paste is allowed.
EndDate Gets or sets end date.
Format Gets or sets DateTime format for start and end dates of range.
HideSeconds Gets or sets whether seconds section of start and end DateTimePickers is visible.
HideTime Gets or sets whether time section of start and end DateTimePickers is visible.
IsReadOnly Gets or sets whether Span readonly.
Ranges Gets or sets collection of DateRanges presented on Ranges combobox.
SelectedRange Gets or sets DateRange selected on Ranges combobox.
ShowOptionsButton Gets or sets whether options button of start and end DateTimePickers is visible.
Span Get or sets result date range (of type System.TimeSpan)
StartDate Gets or sets start date.

How to use

Bind a TimeSpan value to the Span property, also specify Ranges, Format. To get/set End and Start date bind to StartDate and EndDate properties.

<orc:DateRangePicker Span="{Binding Span}"
                     StartDate="{Binding StartDate}"
                     EndDate="{Binding EndDate}"
                     Ranges="{Binding Ranges}"
                     Format="yyyy-MM-dd HH:mm:ss"/>

Have a question about Catel or WildGums controls? Use StackOverflow with the Catel tag!


Discussion