ASP.NET MVC - EJ2

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DateRangePickerBuilder

    Show / Hide Table of Contents

    Class DateRangePickerBuilder

    Inheritance
    System.Object
    ControlBuilder
    DateRangePickerBuilder
    Inherited Members
    ControlBuilder.Context
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.EJ2.Calendars
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class DateRangePickerBuilder : ControlBuilder

    Constructors

    DateRangePickerBuilder()

    Declaration
    public DateRangePickerBuilder()

    DateRangePickerBuilder(DateRangePicker)

    Declaration
    public DateRangePickerBuilder(DateRangePicker model)
    Parameters
    Type Name Description
    DateRangePicker model

    Fields

    model

    Declaration
    public DateRangePicker model
    Field Value
    Type Description
    DateRangePicker

    Properties

    HtmlAttr

    Declaration
    public IDictionary<string, object> HtmlAttr { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>

    ID

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    Output

    Declaration
    public override TextWriter Output { get; set; }
    Property Value
    Type Description
    System.IO.TextWriter
    Overrides
    ControlBuilder.Output

    Methods

    AllowEdit(Boolean)

    Support for allowEdit has been provided from v16.2.46.

    Declaration
    public DateRangePickerBuilder AllowEdit(bool allowEdit = true)
    Parameters
    Type Name Description
    System.Boolean allowEdit
    Returns
    Type Description
    DateRangePickerBuilder

    Blur(String)

    Triggers when the control loses the focus.

    Declaration
    public DateRangePickerBuilder Blur(string blur)
    Parameters
    Type Name Description
    System.String blur
    Returns
    Type Description
    DateRangePickerBuilder

    Change(String)

    Triggers when the Calendar value is changed.

    Declaration
    public DateRangePickerBuilder Change(string change)
    Parameters
    Type Name Description
    System.String change
    Returns
    Type Description
    DateRangePickerBuilder

    Cleared(String)

    Triggers when daterangepicker value is cleared using clear button.

    Declaration
    public DateRangePickerBuilder Cleared(string cleared)
    Parameters
    Type Name Description
    System.String cleared
    Returns
    Type Description
    DateRangePickerBuilder

    Close(String)

    Triggers when the DateRangePicker is closed.

    Declaration
    public DateRangePickerBuilder Close(string close)
    Parameters
    Type Name Description
    System.String close
    Returns
    Type Description
    DateRangePickerBuilder

    Created(String)

    Triggers when Calendar is created.

    Declaration
    public DateRangePickerBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    DateRangePickerBuilder

    CssClass(String)

    Sets the root CSS class to the DateRangePicker which allows you to customize the appearance.

    Declaration
    public DateRangePickerBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    DateRangePickerBuilder

    DayHeaderFormat(DayHeaderFormats)

    Specifies the format of the day that to be displayed in header. By default, the format is ‘short’. Possible formats are: Short - Sets the short format of day name (like Su ) in day header. Narrow - Sets the single character of day name (like S ) in day header. Abbreviated - Sets the min format of day name (like Sun ) in day header. Wide - Sets the long format of day name (like Sunday ) in day header.

    Declaration
    public DateRangePickerBuilder DayHeaderFormat(DayHeaderFormats dayHeaderFormat)
    Parameters
    Type Name Description
    DayHeaderFormats dayHeaderFormat
    Returns
    Type Description
    DateRangePickerBuilder

    Depth(CalendarView)

    Sets the maximum level of view (month, year, decade) in the Calendar. Depth view should be smaller than the start view to restrict its view navigation.

    Declaration
    public DateRangePickerBuilder Depth(CalendarView depth)
    Parameters
    Type Name Description
    CalendarView depth
    Returns
    Type Description
    DateRangePickerBuilder

    Destroyed(String)

    Triggers when Calendar is destroyed.

    Declaration
    public DateRangePickerBuilder Destroyed(string destroyed)
    Parameters
    Type Name Description
    System.String destroyed
    Returns
    Type Description
    DateRangePickerBuilder

    Enabled(Boolean)

    Specifies the component to be disabled which prevents the DateRangePicker from user interactions.

    Declaration
    public DateRangePickerBuilder Enabled(bool enabled = true)
    Parameters
    Type Name Description
    System.Boolean enabled
    Returns
    Type Description
    DateRangePickerBuilder

    EnablePersistence(Boolean)

    Enable or disable the persisting component's state between the page reloads. If enabled, following list of states will be persisted.

    1. startDate
    2. endDate
    3. value
    Declaration
    public DateRangePickerBuilder EnablePersistence(bool enablePersistence = true)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    DateRangePickerBuilder

    EnableRtl(Boolean)

    Enable or disable rendering component in right to left direction.

    Declaration
    public DateRangePickerBuilder EnableRtl(bool enableRtl = true)
    Parameters
    Type Name Description
    System.Boolean enableRtl
    Returns
    Type Description
    DateRangePickerBuilder

    EndDate(Object)

    Gets or sets the end date of the date range selection.

    Declaration
    public DateRangePickerBuilder EndDate(object endDate)
    Parameters
    Type Name Description
    System.Object endDate
    Returns
    Type Description
    DateRangePickerBuilder

    FirstDayOfWeek(Double)

    Gets or sets the Calendar's first day of the week. By default, the first day of the week will be based on the current culture.

    For more details about firstDayOfWeek refer to First day of week documentation.

    Declaration
    public DateRangePickerBuilder FirstDayOfWeek(double firstDayOfWeek)
    Parameters
    Type Name Description
    System.Double firstDayOfWeek
    Returns
    Type Description
    DateRangePickerBuilder

    FloatLabelType(FloatLabelType)

    Specifies the placeholder text to be floated. Possible values are: Never: The label will never float in the input when the placeholder is available. Always: The floating label will always float above the input. Auto: The floating label will float above the input after focusing or entering a value in the input.

    Declaration
    public DateRangePickerBuilder FloatLabelType(FloatLabelType floatLabelType)
    Parameters
    Type Name Description
    FloatLabelType floatLabelType
    Returns
    Type Description
    DateRangePickerBuilder

    Focus(String)

    Triggers when the control gets focus.

    Declaration
    public DateRangePickerBuilder Focus(string focus)
    Parameters
    Type Name Description
    System.String focus
    Returns
    Type Description
    DateRangePickerBuilder

    Format(String)

    Sets or gets the required date format to the start and end date string.

    For more details refer to Formatsample.

    Declaration
    public DateRangePickerBuilder Format(string format)
    Parameters
    Type Name Description
    System.String format
    Returns
    Type Description
    DateRangePickerBuilder

    HtmlAttributes(Object)

    You can add the additional html attributes such as disabled, value etc., to the element. If you configured both property and equivalent html attribute then the component considers the property value. {% codeBlock src='daterangepicker/htmlAttributes/index.md' %}{% endcodeBlock %}

    Declaration
    public DateRangePickerBuilder HtmlAttributes(object htmlAttributes)
    Parameters
    Type Name Description
    System.Object htmlAttributes
    Returns
    Type Description
    DateRangePickerBuilder

    KeyConfigs(Object)

    Customizes the key actions in DateRangePicker. For example, when using German keyboard, the key actions can be customized using these shortcuts.

    Declaration
    public DateRangePickerBuilder KeyConfigs(object keyConfigs)
    Parameters
    Type Name Description
    System.Object keyConfigs
    Returns
    Type Description
    DateRangePickerBuilder

    Locale(String)

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public DateRangePickerBuilder Locale(string locale)
    Parameters
    Type Name Description
    System.String locale
    Returns
    Type Description
    DateRangePickerBuilder

    Max(Object)

    Gets or sets the maximum date that can be selected in the calendar-popup.

    Declaration
    public DateRangePickerBuilder Max(object max)
    Parameters
    Type Name Description
    System.Object max
    Returns
    Type Description
    DateRangePickerBuilder

    MaxDays(Int32)

    Specifies the maximum span of days that can be allowed in a date range selection.

    For more details refer to Range Span documentation.

    Declaration
    public DateRangePickerBuilder MaxDays(int maxDays)
    Parameters
    Type Name Description
    System.Int32 maxDays
    Returns
    Type Description
    DateRangePickerBuilder

    Min(Object)

    Gets or sets the minimum date that can be selected in the calendar-popup.

    Declaration
    public DateRangePickerBuilder Min(object min)
    Parameters
    Type Name Description
    System.Object min
    Returns
    Type Description
    DateRangePickerBuilder

    MinDays(Int32)

    Specifies the minimum span of days that can be allowed in date range selection.

    For more details refer to Range Span documentation.

    Declaration
    public DateRangePickerBuilder MinDays(int minDays)
    Parameters
    Type Name Description
    System.Int32 minDays
    Returns
    Type Description
    DateRangePickerBuilder

    Navigated(String)

    Triggers when the Calendar is navigated to another view or within the same level of view.

    Declaration
    public DateRangePickerBuilder Navigated(string navigated)
    Parameters
    Type Name Description
    System.String navigated
    Returns
    Type Description
    DateRangePickerBuilder

    Open(String)

    Triggers when the DateRangePicker is opened.

    Declaration
    public DateRangePickerBuilder Open(string open)
    Parameters
    Type Name Description
    System.String open
    Returns
    Type Description
    DateRangePickerBuilder

    OpenOnFocus(Boolean)

    By default, the popup opens while clicking on the daterangepicker icon. If you want to open the popup while focusing the daterange input then specify its value as true.

    Declaration
    public DateRangePickerBuilder OpenOnFocus(bool openOnFocus = true)
    Parameters
    Type Name Description
    System.Boolean openOnFocus
    Returns
    Type Description
    DateRangePickerBuilder

    Placeholder(String)

    Specifies the placeholder text that need to be displayed in the DateRangePicker component.

    Declaration
    public DateRangePickerBuilder Placeholder(string placeholder)
    Parameters
    Type Name Description
    System.String placeholder
    Returns
    Type Description
    DateRangePickerBuilder

    Presets(Action<DateRangePickerPresetBuilder>)

    Declaration
    public DateRangePickerBuilder Presets(Action<DateRangePickerPresetBuilder> presets)
    Parameters
    Type Name Description
    System.Action<DateRangePickerPresetBuilder> presets
    Returns
    Type Description
    DateRangePickerBuilder

    Presets(List<DateRangePickerPreset>)

    Set the predefined ranges which let the user pick required range easily in a component.

    For more details refer to Preset Ranges documentation. {% codeBlock src='daterangepicker/presets/index.md' %}{% endcodeBlock %}

    Declaration
    public DateRangePickerBuilder Presets(List<DateRangePickerPreset> presets)
    Parameters
    Type Name Description
    System.Collections.Generic.List<DateRangePickerPreset> presets
    Returns
    Type Description
    DateRangePickerBuilder

    Readonly(Boolean)

    Declaration
    public DateRangePickerBuilder Readonly(bool readOnly = true)
    Parameters
    Type Name Description
    System.Boolean readOnly
    Returns
    Type Description
    DateRangePickerBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    Microsoft.AspNetCore.Html.HtmlString

    RenderDayCell(String)

    Triggers when each day cell of the Calendar is rendered.

    Declaration
    public DateRangePickerBuilder RenderDayCell(string renderDayCell)
    Parameters
    Type Name Description
    System.String renderDayCell
    Returns
    Type Description
    DateRangePickerBuilder

    Select(String)

    Triggers on selecting the start and end date.

    Declaration
    public DateRangePickerBuilder Select(string select)
    Parameters
    Type Name Description
    System.String select
    Returns
    Type Description
    DateRangePickerBuilder

    Separator(String)

    Sets or gets the string that used between the start and end date string.

    Declaration
    public DateRangePickerBuilder Separator(string separator)
    Parameters
    Type Name Description
    System.String separator
    Returns
    Type Description
    DateRangePickerBuilder

    ServerTimezoneOffset(Double)

    By default, the date value will be processed based on system time zone. If you want to process the initial date value using server time zone then specify the time zone value to serverTimezoneOffset property.

    Declaration
    public DateRangePickerBuilder ServerTimezoneOffset(double serverTimezoneOffset)
    Parameters
    Type Name Description
    System.Double serverTimezoneOffset
    Returns
    Type Description
    DateRangePickerBuilder

    ShowClearButton(Boolean)

    Specifies whether to show or hide the clear icon

    Declaration
    public DateRangePickerBuilder ShowClearButton(bool showClearButton = true)
    Parameters
    Type Name Description
    System.Boolean showClearButton
    Returns
    Type Description
    DateRangePickerBuilder

    Start(CalendarView)

    Specifies the initial view of the Calendar when it is opened. With the help of this property, initial view can be changed to year or decade view.

    Declaration
    public DateRangePickerBuilder Start(CalendarView start)
    Parameters
    Type Name Description
    CalendarView start
    Returns
    Type Description
    DateRangePickerBuilder

    StartDate(Object)

    Gets or sets the start date of the date range selection.

    Declaration
    public DateRangePickerBuilder StartDate(object startDate)
    Parameters
    Type Name Description
    System.Object startDate
    Returns
    Type Description
    DateRangePickerBuilder

    StrictMode(Boolean)

    Specifies the component to act as strict which allows entering only a valid date range in a DateRangePicker.

    For more details refer to Strict Modedocumentation.

    Declaration
    public DateRangePickerBuilder StrictMode(bool strictMode = true)
    Parameters
    Type Name Description
    System.Boolean strictMode
    Returns
    Type Description
    DateRangePickerBuilder

    Value(DateRangePickerDateRange)

    Gets or sets the start and end date of the Calendar. {% codeBlock src='daterangepicker/value/index.md' %}{% endcodeBlock %}

    Declaration
    public DateRangePickerBuilder Value(DateRangePickerDateRange value)
    Parameters
    Type Name Description
    DateRangePickerDateRange value
    Returns
    Type Description
    DateRangePickerBuilder

    Value(Action<DateRangePickerDateRangeBuilder>)

    Declaration
    public DateRangePickerBuilder Value(Action<DateRangePickerDateRangeBuilder> value)
    Parameters
    Type Name Description
    System.Action<DateRangePickerDateRangeBuilder> value
    Returns
    Type Description
    DateRangePickerBuilder

    Value(Object)

    Gets or sets the start and end date of the Calendar. {% codeBlock src='daterangepicker/value/index.md' %}{% endcodeBlock %}

    Declaration
    public DateRangePickerBuilder Value(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    DateRangePickerBuilder

    WeekNumber(Boolean)

    Determines whether the week number of the Calendar is to be displayed or not. The week number is displayed in every week row.

    For more details about weekNumber refer to Calendar with week numberdocumentation.

    Declaration
    public DateRangePickerBuilder WeekNumber(bool weekNumber = true)
    Parameters
    Type Name Description
    System.Boolean weekNumber
    Returns
    Type Description
    DateRangePickerBuilder

    WeekRule(WeekRule)

    Specifies the rule for defining the first week of the year.

    Declaration
    public DateRangePickerBuilder WeekRule(WeekRule weekRule)
    Parameters
    Type Name Description
    WeekRule weekRule
    Returns
    Type Description
    DateRangePickerBuilder

    Width(Double)

    Specifies the width of the DateRangePicker component.

    Declaration
    public DateRangePickerBuilder Width(double width)
    Parameters
    Type Name Description
    System.Double width
    Returns
    Type Description
    DateRangePickerBuilder

    Width(String)

    Specifies the width of the DateRangePicker component.

    Declaration
    public DateRangePickerBuilder Width(string width)
    Parameters
    Type Name Description
    System.String width
    Returns
    Type Description
    DateRangePickerBuilder

    ZIndex(Int32)

    specifies the z-index value of the dateRangePicker popup element.

    Declaration
    public DateRangePickerBuilder ZIndex(int zIndex)
    Parameters
    Type Name Description
    System.Int32 zIndex
    Returns
    Type Description
    DateRangePickerBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved