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 DatePickerBuilder

    Show / Hide Table of Contents

    Class DatePickerBuilder

    Inheritance
    System.Object
    ControlBuilder
    DatePickerBuilder
    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 DatePickerBuilder : ControlBuilder

    Constructors

    DatePickerBuilder()

    Declaration
    public DatePickerBuilder()

    DatePickerBuilder(DatePicker)

    Declaration
    public DatePickerBuilder(DatePicker model)
    Parameters
    Type Name Description
    DatePicker model

    Fields

    model

    Declaration
    public DatePicker model
    Field Value
    Type Description
    DatePicker

    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 DatePickerBuilder AllowEdit(bool allowEdit = true)
    Parameters
    Type Name Description
    System.Boolean allowEdit
    Returns
    Type Description
    DatePickerBuilder

    Blur(String)

    Triggers when the input loses the focus.

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

    CalendarMode(CalendarType)

    Gets or sets the Calendar's Type like gregorian or islamic.

    Declaration
    public DatePickerBuilder CalendarMode(CalendarType calendarMode)
    Parameters
    Type Name Description
    CalendarType calendarMode
    Returns
    Type Description
    DatePickerBuilder

    Change(String)

    Triggers when the Calendar value is changed.

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

    Cleared(String)

    Triggers when datepicker value is cleared using clear button.

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

    Close(String)

    Triggers when the popup is closed.

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

    Created(String)

    Triggers when the component is created.

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

    CssClass(String)

    Specifies the root CSS class of the DatePicker that allows to customize the appearance by overriding the styles.

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

    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 DatePickerBuilder DayHeaderFormat(DayHeaderFormats dayHeaderFormat)
    Parameters
    Type Name Description
    DayHeaderFormats dayHeaderFormat
    Returns
    Type Description
    DatePickerBuilder

    Depth(CalendarView)

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

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

    Destroyed(String)

    Triggers when the component is destroyed.

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

    Enabled(Boolean)

    Specifies the component to be disabled or not.

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

    EnableMask(Boolean)

    Specifies whether it is a masked datepicker or not. By default the datepicker component render without masked input. If you need masked datepicker input then specify it as true.

    Declaration
    public DatePickerBuilder EnableMask(bool enableMask = true)
    Parameters
    Type Name Description
    System.Boolean enableMask
    Returns
    Type Description
    DatePickerBuilder

    EnablePersistence(Boolean)

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

    1. value
    Declaration
    public DatePickerBuilder EnablePersistence(bool enablePersistence = true)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    DatePickerBuilder

    EnableRtl(Boolean)

    Enable or disable rendering component in right to left direction.

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

    FirstDayOfWeek(Int32)

    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.

    Declaration
    public DatePickerBuilder FirstDayOfWeek(int firstDayOfWeek)
    Parameters
    Type Name Description
    System.Int32 firstDayOfWeek
    Returns
    Type Description
    DatePickerBuilder

    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 DatePickerBuilder FloatLabelType(FloatLabelType floatLabelType)
    Parameters
    Type Name Description
    FloatLabelType floatLabelType
    Returns
    Type Description
    DatePickerBuilder

    Focus(String)

    Triggers when the input gets focus.

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

    Format(String)

    Specifies the format of the value that to be displayed in component. By default, the format is based on the culture. You can set the format to "format:'dd/MM/yyyy hh:mm'" or "format:{skeleton:'medium'}" either in string or object.

    To know more about the date format standards, refer to the Internationalization Date Format Internationalization section.

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

    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='datepicker/htmlAttributes/index.md' %}{% endcodeBlock %}

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

    KeyConfigs(Object)

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

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

    Locale(String)

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

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

    MaskPlaceholder(DatePickerMaskPlaceholder)

    Specifies the mask placeholder to be displayed on masked datepicker.

    Declaration
    public DatePickerBuilder MaskPlaceholder(DatePickerMaskPlaceholder maskPlaceholder)
    Parameters
    Type Name Description
    DatePickerMaskPlaceholder maskPlaceholder
    Returns
    Type Description
    DatePickerBuilder

    MaskPlaceholder(Action<DatePickerMaskPlaceholderBuilder>)

    Declaration
    public DatePickerBuilder MaskPlaceholder(Action<DatePickerMaskPlaceholderBuilder> maskPlaceholder)
    Parameters
    Type Name Description
    System.Action<DatePickerMaskPlaceholderBuilder> maskPlaceholder
    Returns
    Type Description
    DatePickerBuilder

    Max(Object)

    Gets or sets the maximum date that can be selected in the Calendar.

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

    Min(Object)

    Gets or sets the minimum date that can be selected in the Calendar.

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

    Navigated(String)

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

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

    Open(String)

    Triggers when the popup is opened.

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

    OpenOnFocus(Boolean)

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

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

    Placeholder(String)

    Specifies the placeholder text that displayed in textbox.

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

    Readonly(Boolean)

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

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    System.Web.HtmlString

    RenderDayCell(String)

    Triggers when each day cell of the Calendar is rendered.

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

    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 DatePickerBuilder ServerTimezoneOffset(double serverTimezoneOffset)
    Parameters
    Type Name Description
    System.Double serverTimezoneOffset
    Returns
    Type Description
    DatePickerBuilder

    ShowClearButton(Boolean)

    Specifies whether to show or hide the clear icon in textbox.

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

    ShowTodayButton(Boolean)

    Specifies whether the today button is to be displayed or not.

    Declaration
    public DatePickerBuilder ShowTodayButton(bool showTodayButton = true)
    Parameters
    Type Name Description
    System.Boolean showTodayButton
    Returns
    Type Description
    DatePickerBuilder

    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 DatePickerBuilder Start(CalendarView start)
    Parameters
    Type Name Description
    CalendarView start
    Returns
    Type Description
    DatePickerBuilder

    StrictMode(Boolean)

    Specifies the component to act as strict. So that, it allows to enter only a valid date value within a specified range or else it will resets to previous value. By default, strictMode is in false. it allows invalid or out-of-range date value with highlighted error class.

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

    Value(Object)

    Gets or sets the selected date of the Calendar.

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

    WeekNumber(Boolean)

    Determines whether the week number of the year is to be displayed in the calendar or not.

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

    WeekRule(WeekRule)

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

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

    Width(Double)

    Specifies the width of the DatePicker component.

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

    Width(String)

    Specifies the width of the DatePicker component.

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

    ZIndex(Int32)

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

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