ASP.NET MVC - EJ2

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DateTimePicker - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DateTimePicker

    Inheritance
    System.Object
    TagHelper
    EJTagHelper
    DateTimePicker
    Inherited Members
    EJTagHelper.GetList()
    EJTagHelper.GetSerializedProperties()
    EJTagHelper.GetScriptString()
    EJTagHelper.GetHtmlAttrString(IDictionary<String, Object>)
    EJTagHelper.Id
    EJTagHelper.IsChild
    EJTagHelper.IsComplex
    EJTagHelper.IsCollection
    EJTagHelper.ParentPropertyName
    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 DateTimePicker : EJTagHelper

    Constructors

    DateTimePicker()

    Declaration
    public DateTimePicker()

    Properties

    AllowEdit

    Support for allowEdit has been provided from v16.2.46.

    Declaration
    [HtmlAttributeName("allowEdit")]
    public bool AllowEdit { get; set; }
    Property Value
    Type Description
    System.Boolean

    Blur

    Triggers when input loses the focus.

    Declaration
    [HtmlAttributeName("blur")]
    public string Blur { get; set; }
    Property Value
    Type Description
    System.String

    CalendarMode

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

    Declaration
    [HtmlAttributeName("calendarMode")]
    public CalendarType CalendarMode { get; set; }
    Property Value
    Type Description
    CalendarType

    Change

    Triggers when the Calendar value is changed.

    Declaration
    [HtmlAttributeName("change")]
    public string Change { get; set; }
    Property Value
    Type Description
    System.String

    ClassName

    Declaration
    protected override string ClassName { get; }
    Property Value
    Type Description
    System.String
    Overrides
    EJTagHelper.ClassName

    Cleared

    Triggers when datetimepicker value is cleared using clear button.

    Declaration
    [HtmlAttributeName("cleared")]
    public string Cleared { get; set; }
    Property Value
    Type Description
    System.String

    Close

    Triggers when popup is closed.

    Declaration
    [HtmlAttributeName("close")]
    public string Close { get; set; }
    Property Value
    Type Description
    System.String

    Created

    Triggers when DateTimePicker is created.

    Declaration
    [HtmlAttributeName("created")]
    public string Created { get; set; }
    Property Value
    Type Description
    System.String

    CssClass

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

    Declaration
    [HtmlAttributeName("cssClass")]
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    DayHeaderFormat

    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
    [HtmlAttributeName("dayHeaderFormat")]
    public DayHeaderFormats DayHeaderFormat { get; set; }
    Property Value
    Type Description
    DayHeaderFormats

    Depth

    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
    [HtmlAttributeName("depth")]
    public CalendarView Depth { get; set; }
    Property Value
    Type Description
    CalendarView

    Destroyed

    Triggers when DateTimePicker is destroyed.

    Declaration
    [HtmlAttributeName("destroyed")]
    public string Destroyed { get; set; }
    Property Value
    Type Description
    System.String

    Enabled

    Specifies the component to be disabled or not.

    Declaration
    [HtmlAttributeName("enabled")]
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableMask

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

    Declaration
    [HtmlAttributeName("enableMask")]
    public bool EnableMask { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePersistence

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

    1. value
    Declaration
    [HtmlAttributeName("enablePersistence")]
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    [HtmlAttributeName("enableRtl")]
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    FirstDayOfWeek

    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
    [HtmlAttributeName("firstDayOfWeek")]
    public int FirstDayOfWeek { get; set; }
    Property Value
    Type Description
    System.Int32

    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
    [HtmlAttributeName("floatLabelType")]
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType

    Focus

    Triggers when input gets focus.

    Declaration
    [HtmlAttributeName("focus")]
    public string Focus { get; set; }
    Property Value
    Type Description
    System.String

    Format

    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
    [HtmlAttributeName("format")]
    public string Format { get; set; }
    Property Value
    Type Description
    System.String

    HtmlAttributes

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

    Declaration
    [HtmlAttributeName("htmlAttributes")]
    public object HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Object

    IsFor

    Declaration
    protected override bool IsFor { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    EJTagHelper.IsFor

    KeyConfigs

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

    Declaration
    [HtmlAttributeName("keyConfigs")]
    public object KeyConfigs { get; set; }
    Property Value
    Type Description
    System.Object

    Locale

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

    Declaration
    [HtmlAttributeName("locale")]
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    MaskPlaceholder

    Specifies the mask placeholder to be displayed on masked datetimepicker.

    Declaration
    [HtmlAttributeName("maskPlaceholder")]
    public DateTimePickerMaskPlaceholder MaskPlaceholder { get; set; }
    Property Value
    Type Description
    DateTimePickerMaskPlaceholder

    Max

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

    Declaration
    [HtmlAttributeName("max")]
    public object Max { get; set; }
    Property Value
    Type Description
    System.Object

    Min

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

    Declaration
    [HtmlAttributeName("min")]
    public object Min { get; set; }
    Property Value
    Type Description
    System.Object

    NameSpace

    Declaration
    protected override string NameSpace { get; }
    Property Value
    Type Description
    System.String
    Overrides
    EJTagHelper.NameSpace

    Navigated

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

    Declaration
    [HtmlAttributeName("navigated")]
    public string Navigated { get; set; }
    Property Value
    Type Description
    System.String

    Open

    Triggers when popup is opened.

    Declaration
    [HtmlAttributeName("open")]
    public string Open { get; set; }
    Property Value
    Type Description
    System.String

    OpenOnFocus

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

    Declaration
    [HtmlAttributeName("openOnFocus")]
    public bool OpenOnFocus { get; set; }
    Property Value
    Type Description
    System.Boolean

    Placeholder

    Specifies the placeholder text that to be is displayed in textbox.

    Declaration
    [HtmlAttributeName("placeholder")]
    public string Placeholder { get; set; }
    Property Value
    Type Description
    System.String

    Readonly

    Specifies the component in readonly state. When the Component is readonly it does not allow user input.

    Declaration
    [HtmlAttributeName("readonly")]
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    RenderDayCell

    Triggers when each day cell of the Calendar is rendered.

    Declaration
    [HtmlAttributeName("renderDayCell")]
    public string RenderDayCell { get; set; }
    Property Value
    Type Description
    System.String

    ScrollTo

    Specifies the scroll bar position if there is no value is selected in the timepicker popup list or the given value is not present in the timepicker popup list. {% codeBlock src='datetimepicker/scrollTo/index.md' %}{% endcodeBlock %}

    Declaration
    [HtmlAttributeName("scrollTo")]
    public object ScrollTo { get; set; }
    Property Value
    Type Description
    System.Object

    ServerTimezoneOffset

    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
    [HtmlAttributeName("serverTimezoneOffset")]
    public double ServerTimezoneOffset { get; set; }
    Property Value
    Type Description
    System.Double

    ShowClearButton

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

    Declaration
    [HtmlAttributeName("showClearButton")]
    public bool ShowClearButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowTodayButton

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

    Declaration
    [HtmlAttributeName("showTodayButton")]
    public bool ShowTodayButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    Start

    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
    [HtmlAttributeName("start")]
    public CalendarView Start { get; set; }
    Property Value
    Type Description
    CalendarView

    Step

    Specifies the time interval between the two adjacent time values in the time popup list .

    Declaration
    [HtmlAttributeName("step")]
    public double Step { get; set; }
    Property Value
    Type Description
    System.Double

    StrictMode

    Specifies the component to act as strict. So that, it allows to enter only a valid date and time 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 value with highlighted error class.

    Declaration
    [HtmlAttributeName("strictMode")]
    public bool StrictMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    TagName

    Declaration
    protected override string TagName { get; }
    Property Value
    Type Description
    System.String
    Overrides
    EJTagHelper.TagName

    TimeFormat

    Specifies the format of the time value that to be displayed in time popup list.

    Declaration
    [HtmlAttributeName("timeFormat")]
    public string TimeFormat { get; set; }
    Property Value
    Type Description
    System.String

    Value

    Gets or sets the selected date of the Calendar.

    Declaration
    [HtmlAttributeName("value")]
    public object Value { get; set; }
    Property Value
    Type Description
    System.Object

    WeekNumber

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

    Declaration
    [HtmlAttributeName("weekNumber")]
    public bool WeekNumber { get; set; }
    Property Value
    Type Description
    System.Boolean

    WeekRule

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

    Declaration
    [HtmlAttributeName("weekRule")]
    public WeekRule WeekRule { get; set; }
    Property Value
    Type Description
    WeekRule

    Width

    Specifies the width of the DatePicker component.

    Declaration
    [HtmlAttributeName("width")]
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    ZIndex

    specifies the z-index value of the popup element.

    Declaration
    [HtmlAttributeName("zIndex")]
    public int ZIndex { get; set; }
    Property Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved