Class RadDateRangePicker
Represents an input control for selecting a range of two dates.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll
Syntax
[Themable]
[TelerikToolboxCategory("Input")]
public class RadDateRangePicker : Control, IThemable
Constructors
RadDateRangePicker()
Fields
AreWeekNamesVisibleProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty AreWeekNamesVisibleProperty
Field Value
System.Windows.DependencyProperty
|
AreWeekNumbersVisibleProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty AreWeekNumbersVisibleProperty
Field Value
System.Windows.DependencyProperty
|
BlackoutDatesProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty BlackoutDatesProperty
Field Value
System.Windows.DependencyProperty
|
CalendarWeekRuleProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty CalendarWeekRuleProperty
Field Value
System.Windows.DependencyProperty
|
ClearButtonStyleProperty
Identifies the ClearButtonStyle dependency property.
Declaration
public static readonly DependencyProperty ClearButtonStyleProperty
Field Value
System.Windows.DependencyProperty
|
CultureProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
System.Windows.DependencyProperty
|
DatePatternProperty
Identifies the DatePattern dependency property.
Declaration
public static readonly DependencyProperty DatePatternProperty
Field Value
System.Windows.DependencyProperty
|
EmptyContentProperty
Identifies the EmptyContent dependency property.
Declaration
public static readonly DependencyProperty EmptyContentProperty
Field Value
System.Windows.DependencyProperty
|
EmptyContentTemplateProperty
Identifies the EmptyContentTemplate dependency property.
Declaration
public static readonly DependencyProperty EmptyContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
EndDateProperty
Identifies EndDate dependency property.
Declaration
public static readonly DependencyProperty EndDateProperty
Field Value
System.Windows.DependencyProperty
|
FirstDayOfWeekProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty FirstDayOfWeekProperty
Field Value
System.Windows.DependencyProperty
|
FormatStringProperty
Identifies the FormatString dependency property.
Declaration
public static readonly DependencyProperty FormatStringProperty
Field Value
System.Windows.DependencyProperty
|
HeaderVisibilityProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty HeaderVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
IsClearButtonVisibleProperty
Identifies the IsClearButtonVisible dependency property.
Declaration
public static readonly DependencyProperty IsClearButtonVisibleProperty
Field Value
System.Windows.DependencyProperty
|
IsDefaultRangesPanelVisibleProperty
Identifies the IsDefaultRangesPanelVisible dependency property.
Declaration
public static readonly DependencyProperty IsDefaultRangesPanelVisibleProperty
Field Value
System.Windows.DependencyProperty
|
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
System.Windows.DependencyProperty
|
IsRangeEndProperty
Identifies IsRangeEnd attached property.
Declaration
public static readonly DependencyProperty IsRangeEndProperty
Field Value
System.Windows.DependencyProperty
|
IsRangeStartProperty
Identifies IsRangeStart attached property.
Declaration
public static readonly DependencyProperty IsRangeStartProperty
Field Value
System.Windows.DependencyProperty
|
IsReadOnlyProperty
Identifies the IsReadOnly dependency property.
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
System.Windows.DependencyProperty
|
IsTopBarVisibleProperty
Identifies the IsTopBarVisible dependency property.
Declaration
public static readonly DependencyProperty IsTopBarVisibleProperty
Field Value
System.Windows.DependencyProperty
|
PlaceholderProperty
Identifies the Placeholder dependency property.
Declaration
public static readonly DependencyProperty PlaceholderProperty
Field Value
System.Windows.DependencyProperty
|
SelectableDateEndProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty SelectableDateEndProperty
Field Value
System.Windows.DependencyProperty
|
SelectableDateStartProperty
Identifies the dependency property.
Declaration
public static readonly DependencyProperty SelectableDateStartProperty
Field Value
System.Windows.DependencyProperty
|
SelectionOnFocusProperty
Identifies the SelectionOnFocus dependency property.
Declaration
public static readonly DependencyProperty SelectionOnFocusProperty
Field Value
System.Windows.DependencyProperty
|
SeparatorProperty
Identifies the Separator dependency property.
Declaration
public static readonly DependencyProperty SeparatorProperty
Field Value
System.Windows.DependencyProperty
|
StartDateProperty
Identifies StartDate dependency property.
Declaration
public static readonly DependencyProperty StartDateProperty
Field Value
System.Windows.DependencyProperty
|
UseShortestDayNamesProperty
Identifies the dependency property.
The value that indicates whether the week names buttons are using shortest day names.
Declaration
public static readonly DependencyProperty UseShortestDayNamesProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AreWeekNamesVisible
Gets or sets whether WeekNames will be displayed.
Declaration
public bool AreWeekNamesVisible { get; set; }
Property Value
System.Boolean
|
Remarks
Please note that if you hide the WeekNames would not automatically change the template of the calendar. Depending on the skin, you may need to change the template to visually make up for the fewer displayed elements.
The AreWeekNumbersVisible can also be hidden.
The default value is true.
AreWeekNumbersVisible
Gets or sets whether WeekNumbers will be displayed.
Declaration
public bool AreWeekNumbersVisible { get; set; }
Property Value
System.Boolean
|
Remarks
Please note that if you hide the WeekNumbers it would not automatically change the template of the calendar. Depending on the skin, you may need to change the template to visually make up for the fewer displayed elements.
The AreWeekNamesVisible can also be hidden.
The default value is true.
BlackoutDates
Gets or sets a list of dates that cannot be selected. This is a dependency property.
Declaration
public IEnumerable<DateTime> BlackoutDates { get; set; }
Property Value
System.Collections.Generic.IEnumerable<System.DateTime>
|
Remarks
The BlackoutDates specifies a list of dates that cannot be selected by the user.
CalendarWeekRule
Gets or sets how should the first week in the year be counted. This is a dependency property.
Declaration
public CalendarWeekRule? CalendarWeekRule { get; set; }
Property Value
System.Nullable<System.Globalization.CalendarWeekRule>
|
Remarks
By default if no value is set (or is set to null), the CalendarWeek rule will be taken from Culture property (or InvariantCulture)'s DateTimeFormat.CalendarWeekRule.
ClearButtonStyle
Gets or sets the Clear Button style.
Declaration
public Style ClearButtonStyle { get; set; }
Property Value
System.Windows.Style
|
Culture
Gets or sets the culture that the Calendar uses. This is a dependency property.
Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo
|
Remarks
Some of the elements in the Calendar are culture-specific, for example: The day/month names, rules for date formatting, the FirstDayOfWeek, CalendarWeekRule. Some more specific properties like FirstDayOfWeek take precedence over the Culture property if they are set.
If no Culture is specified, all the elements that rely on it will fall back to the CultureInfo.CurrentCulture.
The default value is null.
DatePattern
Gets or sets a value indicating the date pattern used in formatting the dates. Formats for abbreviated days (ddd,dddd), months (MMM, MMMM) are not supported. Hours, minutes, seconds, milliseconds are not supported.
Declaration
public string DatePattern { get; set; }
Property Value
System.String
|
EmptyContent
Gets or sets the Empty content.
Declaration
public object EmptyContent { get; set; }
Property Value
System.Object
|
EmptyContentTemplate
Gets or sets the template of the EmptyContent.
Declaration
public DataTemplate EmptyContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
EndDate
Gets or sets a value indicating the end date of the date range.
Declaration
public DateTime? EndDate { get; set; }
Property Value
System.Nullable<System.DateTime>
|
FirstDayOfWeek
Gets or sets the day that is considered the beginning of the week.
Declaration
public DayOfWeek? FirstDayOfWeek { get; set; }
Property Value
System.Nullable<System.DayOfWeek>
|
Remarks
The FirstDayOfWeek property specifies which is the day in the leftmost column of the calendar view, i.e. which is the first day of the week.
If the property is set to null, the Culture will be checked, if a specific culture is set, its FirstDayOfWeek is considered. Otherwise the CurrentCulture will be used.
Generally, the start of the week varies with different cultures so if you would like the Calendar to display the dates as you see them, be sure to set the FirstDayOfWeek property or the Culture property.
calendar.FirstDayOfWeek = CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;
See Also
FormatString
Gets or sets the formatting string used to format the whole input text.
Declaration
public string FormatString { get; set; }
Property Value
System.String
|
HeaderVisibility
Gets or sets the visibility of the Calendar's header. This is a dependency property.
Declaration
public Visibility HeaderVisibility { get; set; }
Property Value
System.Windows.Visibility
|
Remarks
The header of the calendar is the area on the top in which the Header Button and the Previous and NextButtons reside.
IsClearButtonVisible
Gets or sets whether the clear button is visible.
Declaration
public bool IsClearButtonVisible { get; set; }
Property Value
System.Boolean
|
IsDefaultRangesPanelVisible
Gets or sets a value indicating whether the default ranges panel of the control is visible or not.
Declaration
public bool IsDefaultRangesPanelVisible { get; set; }
Property Value
System.Boolean
|
IsDropDownOpen
Gets or sets a value indicating whether the drop-down part of the control is open.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
System.Boolean
|
IsReadOnly
Gets or sets whether the control is IsReadOnly.
Declaration
public bool IsReadOnly { get; set; }
Property Value
System.Boolean
|
IsTopBarVisible
Gets or sets a value indicating whether the top bar of the control is visible or not.
Declaration
public bool IsTopBarVisible { get; set; }
Property Value
System.Boolean
|
Placeholder
Gets or sets the placeholder symbol marking an empty position in the input.
Declaration
public char Placeholder { get; set; }
Property Value
System.Char
|
SelectableDateEnd
Gets or sets the last date that can be selected. This is a dependency property.
Declaration
public DateTime? SelectableDateEnd { get; set; }
Property Value
System.Nullable<System.DateTime>
|
Remarks
The SelectableDateEnd specifies the last date that can be selected by the user.
SelectableDateStart
Gets or sets the first date that can be selected. This is a dependency property.
Declaration
public DateTime? SelectableDateStart { get; set; }
Property Value
System.Nullable<System.DateTime>
|
Remarks
The SelectableDateStart specifies the first date that can be selected by the user.
SelectionOnFocus
Gets or sets a value indicating the behavior of the caret/selection when the control receives focus.
Declaration
public SelectionOnFocus SelectionOnFocus { get; set; }
Property Value
SelectionOnFocus
|
Separator
Gets or sets the string representing the separator between the dates in the input.
Declaration
public string Separator { get; set; }
Property Value
System.String
|
StartDate
Gets or sets a value indicating the start date of the date range.
Declaration
public DateTime? StartDate { get; set; }
Property Value
System.Nullable<System.DateTime>
|
UseShortestDayNames
Gets or sets UseShortestDayNames property. This is a dependency property.
Declaration
public bool UseShortestDayNames { get; set; }
Property Value
System.Boolean
|
Methods
GetIsRangeEnd(DependencyObject)
Gets the value of IsRangeEnd attached property for particular CalendarButton.
Declaration
public static bool GetIsRangeEnd(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
System.Boolean
|
GetIsRangeStart(DependencyObject)
Gets the value of IsRangeStart attached property for particular CalendarButton.
Declaration
public static bool GetIsRangeStart(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
|
Returns
System.Boolean
|
GetSelectedDaysRepresentation()
Called when user changes start/end day candidates and total selected days UI needs update.
Declaration
protected virtual string GetSelectedDaysRepresentation()
Returns
System.String
|
GetTemporaryEndDateRepresentation(Nullable<DateTime>)
Called when user has selected end day candidate and selection UI needs update.
Declaration
protected virtual string GetTemporaryEndDateRepresentation(DateTime? tempEndDay)
Parameters
System.Nullable<System.DateTime>
tempEndDay
|
Returns
System.String
|
GetTemporaryStartDateRepresentation(Nullable<DateTime>)
Called when user has selected start day candidate and selection UI needs update.
Declaration
protected virtual string GetTemporaryStartDateRepresentation(DateTime? tempStartDay)
Parameters
System.Nullable<System.DateTime>
tempStartDay
|
Returns
System.String
|
IsValidRange()
Called when range is invalidated against blackout dates.
Declaration
protected virtual bool IsValidRange()
Returns
System.Boolean
|
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnPreviewKeyDown(KeyEventArgs)
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs
e
|
SetIsRangeEnd(DependencyObject, Boolean)
Sets the value of IsRangeEnd attached property for particular CalendarButton.
Declaration
public static void SetIsRangeEnd(DependencyObject obj, bool value)
Parameters
System.Windows.DependencyObject
obj
|
System.Boolean
value
|
SetIsRangeStart(DependencyObject, Boolean)
Sets the value of IsRangeStart attached property for particular CalendarButton.
Declaration
public static void SetIsRangeStart(DependencyObject obj, bool value)
Parameters
System.Windows.DependencyObject
obj
|
System.Boolean
value
|
Events
CustomRangesLoading
Occurs before custom ranges are loaded, so that user can reset them according to the current DateTime.
Declaration
public event EventHandler<CustomRangesLoadingEventArgs> CustomRangesLoading
Event Type
System.EventHandler<CustomRangesLoadingEventArgs>
|