Class SfDateTimeRangeSelector
A material design for SfDateTimeRangeSelector.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Maui.Sliders
Assembly: Syncfusion.Maui.Sliders.dll
Syntax
public class SfDateTimeRangeSelector : RangeSelectorBase<DateTime>, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, ITouchListener, ITapGestureListener, IPanGestureListener, IGestureListener, IInteractionState, IRangeView<DateTime>, IDateTimeElement, IParentThemeElement, IThemeElementConstructors
SfDateTimeRangeSelector()
Initializes a new instance of the SfDateTimeRangeSelector
Declaration
public SfDateTimeRangeSelector()Fields
DateFormatProperty
The backing store for the DateFormat field.
Declaration
public static readonly BindableProperty DateFormatPropertyField Value
| Type | Description | 
|---|---|
| Microsoft.Maui.Controls.BindableProperty | Microsoft.Maui.Controls.BindableProperty. | 
IntervalTypeProperty
The backing store for the IntervalType field.
Declaration
public static readonly BindableProperty IntervalTypePropertyField Value
| Type | Description | 
|---|---|
| Microsoft.Maui.Controls.BindableProperty | Microsoft.Maui.Controls.BindableProperty. | 
StepDurationProperty
The backing store for the StepDuration field.
Declaration
public static readonly BindableProperty StepDurationPropertyField Value
| Type | Description | 
|---|---|
| Microsoft.Maui.Controls.BindableProperty | Microsoft.Maui.Controls.BindableProperty. | 
Properties
DateFormat
Gets or sets the value to format the date.
Declaration
public string DateFormat { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | Defaults to  | 
Examples
Snippet for SfRangeSelector
<sliders:SfDateTimeRangeSelector MinimumDate="2010-1-1"
                                 MaximumDate="2011-1-1"
                                 RangeStartDate="2010-4-1"
                                 RangeEndDate="2010-9-1"  
                                 ShowLabels="True"
                                 DateFormat="M yyyy" />IntervalType
Gets or sets the type of the date interval.
Declaration
public SliderDateIntervalType IntervalType { get; set; }Property Value
| Type | Description | 
|---|---|
| SliderDateIntervalType | Defaults to  | 
Examples
Snippet for SfDateTimeRangeSelector
<sliders:SfDateTimeRangeSelector Minimum = "2010-1-1" 
                                 Maximum = "2011-1-1" 
                                 Value = "2010-5-1" 
                                 IntervalType="Months"/>StepDuration
Gets or set the value indication whether to select the discrete date value.
For example, if Minimum is System.DateTime(2015, 01, 01) and Maximum is System.DateTime(2020, 01, 01) and StepDuration is SliderStepDuration(Years: 1, Months: 6), the slider will move the thumb at System.DateTime(2015, 01, 01), System.DateTime(2016, 07, 01), System.DateTime(2018, 01, 01),and System.DateTime(2019, 07, 01).
Declaration
public SliderStepDuration StepDuration { get; set; }Property Value
| Type | Description | 
|---|---|
| SliderStepDuration | Defaults to  | 
Remarks
StepDuration does not work with BetweenThumbs.
Examples
Snippet for SfDateTimeRangeSelector
<sliders:SfDateTimeRangeSelector Minimum="2010-01-01"
                                 Maximum="2015-01-01"
                                 RangeStart="2012-01-01"
                                 RangeEnd="2016-01-01"
                                 StepDuration="5">
</sliders:SfDateTimeRangeSelector>Events
ValueChanged
Represents the ValueChanged event, which occurs when the user is done selecting a new value for the DateTime Range Selector.
Declaration
public event EventHandler<DateTimeRangeSelectorValueChangedEventArgs> ValueChangedEvent Type
| Type | 
|---|
| System.EventHandler<DateTimeRangeSelectorValueChangedEventArgs> | 
Examples
ValueChanging
Represents the ValueChanging event, which occurs when the user is selecting a new value for the DateTime Range Selector by dragging any one of the thumb.
Declaration
public event EventHandler<DateTimeRangeSelectorValueChangingEventArgs> ValueChangingEvent Type
| Type | 
|---|
| System.EventHandler<DateTimeRangeSelectorValueChangingEventArgs> | 
Examples
Explicit Interface Implementations
IDateTimeElement.OnDateFormatChanged(String, String)
Declaration
void IDateTimeElement.OnDateFormatChanged(string oldValue, string newValue)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | oldValue | |
| System.String | newValue | 
IDateTimeElement.OnIntervalTypeChanged(SliderDateIntervalType, SliderDateIntervalType)
Declaration
void IDateTimeElement.OnIntervalTypeChanged(SliderDateIntervalType oldValue, SliderDateIntervalType newValue)Parameters
| Type | Name | Description | 
|---|---|---|
| SliderDateIntervalType | oldValue | |
| SliderDateIntervalType | newValue | 
IDateTimeElement.OnStepChanged()
Declaration
void IDateTimeElement.OnStepChanged()