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 DateTimePicker

    Show / Hide Table of Contents

    Class DateTimePicker

    Inheritance
    System.Object
    EJTagHelper
    DateTimePicker
    Inherited Members
    EJTagHelper.GetList()
    EJTagHelper.Process(TagHelperContext, TagHelperOutput)
    EJTagHelper.RegisterScript()
    EJTagHelper.GetSerializedProperties()
    EJTagHelper.GetScriptString()
    EJTagHelper.GetHtmlAttrString(IDictionary<String, Object>)
    EJTagHelper.ViewContext
    EJTagHelper.Id
    EJTagHelper.IsChild
    EJTagHelper.IsComplex
    EJTagHelper.IsCollection
    EJTagHelper.ParentPropertyName
    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
    public bool AllowEdit { get; set; }
    Property Value
    Type Description
    System.Boolean

    Blur

    Triggers when input loses the focus.

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

    CalendarMode

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

    Declaration
    public CalendarType CalendarMode { get; set; }
    Property Value
    Type Description
    CalendarType

    Change

    Triggers when the Calendar value is changed.

    Declaration
    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
    public string Cleared { get; set; }
    Property Value
    Type Description
    System.String

    Close

    Triggers when popup is closed.

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

    Created

    Triggers when DateTimePicker is created.

    Declaration
    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
    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
    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
    public CalendarView Depth { get; set; }
    Property Value
    Type Description
    CalendarView

    Destroyed

    Triggers when DateTimePicker is destroyed.

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

    Enabled

    Specifies the component to be disabled or not.

    Declaration
    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
    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
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    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
    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
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType

    Focus

    Triggers when input gets focus.

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

    For

    Declaration
    public override ModelExpression For { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression
    Overrides
    EJTagHelper.For

    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
    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
    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
    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
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    MaskPlaceholder

    Specifies the mask placeholder to be displayed on masked datetimepicker.

    Declaration
    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
    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
    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
    public string Navigated { get; set; }
    Property Value
    Type Description
    System.String

    Open

    Triggers when popup is opened.

    Declaration
    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
    public bool OpenOnFocus { get; set; }
    Property Value
    Type Description
    System.Boolean

    Placeholder

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

    Declaration
    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
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    RenderDayCell

    Triggers when each day cell of the Calendar is rendered.

    Declaration
    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
    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
    public double ServerTimezoneOffset { get; set; }
    Property Value
    Type Description
    System.Double

    ShowClearButton

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

    Declaration
    public bool ShowClearButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowTodayButton

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

    Declaration
    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
    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
    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
    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
    public string TimeFormat { get; set; }
    Property Value
    Type Description
    System.String

    Value

    Gets or sets the selected date of the Calendar.

    Declaration
    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
    public bool WeekNumber { get; set; }
    Property Value
    Type Description
    System.Boolean

    WeekRule

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

    Declaration
    public WeekRule WeekRule { get; set; }
    Property Value
    Type Description
    WeekRule

    Width

    Specifies the width of the DatePicker component.

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

    ZIndex

    specifies the z-index value of the popup element.

    Declaration
    public int ZIndex { get; set; }
    Property Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved