RadDateRangePicker
Represents an input control for selecting a range of two dates.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Input.dll
Syntax:
[Themable]
[TelerikToolboxCategory("Input")]
public class RadDateRangePicker : Control
Inheritance: objectRadDateRangePicker
Constructors
Initializes a new instance of the RadDateRangePicker class.
public RadDateRangePicker()
Fields
AreWeekNamesVisibleProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty AreWeekNamesVisibleProperty
AreWeekNumbersVisibleProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty AreWeekNumbersVisibleProperty
BlackoutDatesProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty BlackoutDatesProperty
CalendarWeekRuleProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty CalendarWeekRuleProperty
ClearButtonStyleProperty
DependencyProperty
Identifies the ClearButtonStyle dependency property.
public static readonly DependencyProperty ClearButtonStyleProperty
CultureProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty CultureProperty
DatePatternProperty
DependencyProperty
Identifies the DatePattern dependency property.
public static readonly DependencyProperty DatePatternProperty
EmptyContentProperty
DependencyProperty
Identifies the EmptyContent dependency property.
public static readonly DependencyProperty EmptyContentProperty
EmptyContentTemplateProperty
DependencyProperty
Identifies the EmptyContentTemplate dependency property.
public static readonly DependencyProperty EmptyContentTemplateProperty
EndDateProperty
DependencyProperty
Identifies EndDate dependency property.
public static readonly DependencyProperty EndDateProperty
FirstDayOfWeekProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty FirstDayOfWeekProperty
FormatStringProperty
DependencyProperty
Identifies the FormatString dependency property.
public static readonly DependencyProperty FormatStringProperty
HeaderVisibilityProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty HeaderVisibilityProperty
IsClearButtonVisibleProperty
DependencyProperty
Identifies the IsClearButtonVisible dependency property.
public static readonly DependencyProperty IsClearButtonVisibleProperty
IsDefaultRangesPanelVisibleProperty
DependencyProperty
Identifies the IsDefaultRangesPanelVisible dependency property.
public static readonly DependencyProperty IsDefaultRangesPanelVisibleProperty
IsDropDownOpenProperty
DependencyProperty
Identifies the IsDropDownOpen dependency property.
public static readonly DependencyProperty IsDropDownOpenProperty
IsRangeEndProperty
DependencyProperty
Identifies IsRangeEnd attached property.
public static readonly DependencyProperty IsRangeEndProperty
IsRangeStartProperty
DependencyProperty
Identifies IsRangeStart attached property.
public static readonly DependencyProperty IsRangeStartProperty
IsReadOnlyProperty
DependencyProperty
Identifies the IsReadOnly dependency property.
public static readonly DependencyProperty IsReadOnlyProperty
IsTopBarVisibleProperty
DependencyProperty
Identifies the IsTopBarVisible dependency property.
public static readonly DependencyProperty IsTopBarVisibleProperty
PlaceholderProperty
DependencyProperty
Identifies the Placeholder dependency property.
public static readonly DependencyProperty PlaceholderProperty
SelectableDateEndProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty SelectableDateEndProperty
SelectableDateStartProperty
DependencyProperty
Identifies the dependency property.
public static readonly DependencyProperty SelectableDateStartProperty
SelectionOnFocusProperty
DependencyProperty
Identifies the SelectionOnFocus dependency property.
public static readonly DependencyProperty SelectionOnFocusProperty
SeparatorProperty
DependencyProperty
Identifies the Separator dependency property.
public static readonly DependencyProperty SeparatorProperty
StartDateProperty
DependencyProperty
Identifies StartDate dependency property.
public static readonly DependencyProperty StartDateProperty
UseShortestDayNamesProperty
DependencyProperty
Identifies the dependency property.
The value that indicates whether the week names buttons are using shortest day names.
public static readonly DependencyProperty UseShortestDayNamesProperty
Properties
Gets or sets whether WeekNames will be displayed.
public bool AreWeekNamesVisible { get; set; }
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.
Gets or sets whether WeekNumbers will be displayed.
public bool AreWeekNumbersVisible { get; set; }
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.
Gets or sets a list of dates that cannot be selected. This is a dependency property.
public IEnumerable<DateTime> BlackoutDates { get; set; }
The BlackoutDates specifies a list of dates that cannot be selected by the user.
Gets or sets how should the first week in the year be counted. This is a dependency property.
public CalendarWeekRule? CalendarWeekRule { get; set; }
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
Style
Gets or sets the Clear Button style.
public Style ClearButtonStyle { get; set; }
Gets or sets the culture that the Calendar uses. This is a dependency property.
public CultureInfo Culture { get; set; }
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.
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.
public string DatePattern { get; set; }
Gets or sets the Empty content.
public object EmptyContent { get; set; }
EmptyContentTemplate
DataTemplate
Gets or sets the template of the EmptyContent.
public DataTemplate EmptyContentTemplate { get; set; }
Gets or sets a value indicating the end date of the date range.
public DateTime? EndDate { get; set; }
Gets or sets the day that is considered the beginning of the week.
public DayOfWeek? FirstDayOfWeek { get; set; }
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.
<pre><code class="lang-csharp">calendar.FirstDayOfWeek = CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;</code></pre>
Gets or sets the formatting string used to format the whole input text.
public string FormatString { get; set; }
HeaderVisibility
Visibility
Gets or sets the visibility of the Calendar's header. This is a dependency property.
public Visibility HeaderVisibility { get; set; }
The header of the calendar is the area on the top in which the Header Button and the Previous and NextButtons reside.
Gets or sets whether the clear button is visible.
public bool IsClearButtonVisible { get; set; }
Gets or sets a value indicating whether the default ranges panel of the control is visible or not.
public bool IsDefaultRangesPanelVisible { get; set; }
Gets or sets a value indicating whether the drop-down part of the control is open.
public bool IsDropDownOpen { get; set; }
Gets or sets whether the control is IsReadOnly.
public bool IsReadOnly { get; set; }
Gets or sets a value indicating whether the top bar of the control is visible or not.
public bool IsTopBarVisible { get; set; }
Gets or sets the placeholder symbol marking an empty position in the input.
[TypeConverter(typeof(CharConverter))]
public char Placeholder { get; set; }
Gets or sets the last date that can be selected. This is a dependency property.
public DateTime? SelectableDateEnd { get; set; }
The SelectableDateEnd specifies the last date that can be selected by the user.
Gets or sets the first date that can be selected. This is a dependency property.
public DateTime? SelectableDateStart { get; set; }
The SelectableDateStart specifies the first date that can be selected by the user.
Gets or sets a value indicating the behavior of the caret/selection when the control receives focus.
public SelectionOnFocus SelectionOnFocus { get; set; }
Gets or sets the string representing the separator between the dates in the input.
public string Separator { get; set; }
Methods
Gets the value of IsRangeEnd attached property for particular CalendarButton.
public static bool GetIsRangeEnd(DependencyObject obj)
Gets the value of IsRangeStart attached property for particular CalendarButton.
public static bool GetIsRangeStart(DependencyObject obj)
Called when user changes start/end day candidates and total selected days UI needs update.
Called when range is invalidated against blackout dates.
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
protected override void OnPreviewKeyDown(KeyEventArgs e)
Sets the value of IsRangeEnd attached property for particular CalendarButton.
public static void SetIsRangeEnd(DependencyObject obj, bool value)
Sets the value of IsRangeStart attached property for particular CalendarButton.
public static void SetIsRangeStart(DependencyObject obj, bool value)
Events
Occurs before custom ranges are loaded, so that user can reset them according to the current DateTime.
public event EventHandler<CustomRangesLoadingEventArgs> CustomRangesLoading