Class DatePicker
Represents the DatePicker UI element.
Inheritance
System.Object
DatePicker
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class DatePicker : CommonControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
DatePicker()
Declaration
Properties
AllowDrillDown
Gets or sets a value indicating the date picker calendar drilldown to multiple levels of view (month/year/decade).
Declaration
public bool AllowDrillDown { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AllowEdit
Gets or sets a value indicating the date picker input field editable or not.
Declaration
public bool AllowEdit { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
BlackoutDates
Gets or sets a value indicating the collection of dates to be disabled in the calendar.
Declaration
public List<object> BlackoutDates { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<System.Object> |
|
ButtonText
Gets or sets a value to customize the 'Today' button text.
Declaration
public string ButtonText { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnBeforeClose
Gets or sets a value indicating this event gets fired before closing the date picker popup.
Declaration
public string ClientSideOnBeforeClose { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnBeforeDateCreate
Gets or sets a value indicating this event gets fired when each date is created in the date picker calendar.
Declaration
public string ClientSideOnBeforeDateCreate { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnBeforeOpen
Gets or sets a value indicating this event gets fired before opening the date picker popup.
Declaration
public string ClientSideOnBeforeOpen { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnChange
Gets or sets a value indicating this event gets fired when the date picker input value is changed.
Declaration
public string ClientSideOnChange { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnClose
Gets or sets a value indicating this event gets fired when date picker popup is closed.
Declaration
public string ClientSideOnClose { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnCreate
Gets or sets a value indicating this event gets fired when the date picker is created successfully.
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnDestroy
Gets or sets a value indicating this event gets fired when date picker is destroyed successfully.
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnFocusIn
Declaration
public string ClientSideOnFocusIn { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnFocusOut
Gets or sets a value indicating this event gets fired when date picker input loses focus.
Declaration
public string ClientSideOnFocusOut { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnNavigate
Gets or sets a value indicating this event gets fired calendar navigates.
Declaration
public string ClientSideOnNavigate { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnOpen
Gets or sets a value indicating this event gets fired when date picker popup is opened.
Declaration
public string ClientSideOnOpen { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnSelect
Gets or sets a value indicating this event gets fired when a date is selected from the date picker calendar.
Declaration
public string ClientSideOnSelect { get; set; }
Property Value
Type |
Description |
System.String |
|
CssClass
Gets or sets root CSS class to date picker for theme customization.
Declaration
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
Gets or sets the date format to be displayed in date picker's input field.
Declaration
public string DateFormat { get; set; }
Property Value
Type |
Description |
System.String |
|
Gets or sets a value indicating the header format to be displayed in the calendar.
Declaration
public Header DayHeaderFormat { get; set; }
Property Value
DepthLevel
Gets or sets a value indicating the navigation depth level in the calendar. This is applicable when start level view is lower than depth level view.
Declaration
public Period DepthLevel { get; set; }
Property Value
DisplayInline
Gets or sets a value indicating date picker popup always in visible state or not.
Declaration
public bool DisplayInline { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableAnimation
Gets or sets the value indicating the animation effect when date picker popup opens/closes.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Enabled
Gets or sets a value indicating whether the control can respond to user interaction.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnablePersistence
Gets or set the value indicating date picker model even after form post back/browser refresh sustains or not.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableRTL
Gets or sets the value to align the input field and calender in right to left direction.
Declaration
public bool EnableRTL { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableStrictMode
Gets or sets a value to allow the invalid date in the date picker input field.
Declaration
public bool EnableStrictMode { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value indicating the header format to be displayed in the calendar.
Declaration
public string HeaderFormat { get; set; }
Property Value
Type |
Description |
System.String |
|
Height
Gets or sets a value indicating the height of the date picker input field.
Declaration
public string Height { get; set; }
Property Value
Type |
Description |
System.String |
|
HighlightSection
Gets or sets a value to highlight the month/week/workdays of currently selected date.
Declaration
public Section HighlightSection { get; set; }
Property Value
HighlightWeekend
Gets or sets a value to highlight the weekend dates or not.
Declaration
public bool HighlightWeekend { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
HtmlAttributes
Declaration
public IDictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Locale
Gets or sets the culture to display the calendar in the specified culture.
Declaration
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
MaxDate
Gets or sets a value indicating the maximum date of the calendar.
Declaration
public DateTime? MaxDate { get; set; }
Property Value
Type |
Description |
System.Nullable<System.DateTime> |
|
MinDate
Gets or sets a value indicating the minimum date of the calendar.
Declaration
public DateTime? MinDate { get; set; }
Property Value
Type |
Description |
System.Nullable<System.DateTime> |
|
Model
Gets or sets the date picker model object of the date picker properties.
Declaration
public DatePickerProperties Model { get; set; }
Property Value
ReadOnly
Gets or sets a value indicating editing/selecting the date in date picker is allowed or not.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowDisabledRange
Gets or sets a value to show/hide the disabled dates.
Declaration
public bool ShowDisabledRange { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets the value indicating footer element in the calendar.
Declaration
public bool ShowFooter { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowOtherMonths
Gets or sets the value indicating days of adjacent months in the current month calendar.
Declaration
public bool ShowOtherMonths { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets the value indicating date icon button in the textbox.
Declaration
public bool ShowPopupButton { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowRoundedCorner
Gets or sets the value indicating the date picker input field and popup with rounded corners or not.
Declaration
public bool ShowRoundedCorner { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value to customize the tooltip text while hovering on the days in the calendar.
Declaration
public bool ShowTooltip { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
SpecialDates
Gets or sets a value indicating the special dats in the calendar.
Declaration
[JsonProperty("specialDates")]
public List<SpecialDates> SpecialDates { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<SpecialDates> |
|
StartDay
Gets or sets a value indicating the start day of the week in the calendar.
Declaration
public int StartDay { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
StartLevel
Gets or sets a value indicating the start level (days/month/year) view in the calendar.
Declaration
public Period StartLevel { get; set; }
Property Value
StepMonths
Gets or sets a value indicating the number of months to navigate for one click of next and previous buttons in the calendar.
Declaration
public int StepMonths { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
TagName
Gets or sets the name of the tag name.
Declaration
public string TagName { get; set; }
Property Value
Type |
Description |
System.String |
|
TimeZone
Gets or sets the TimeZone to display the DatePicker value with considered local time zone value.
Declaration
public bool TimeZone { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value to customize the tooltip text format.
Declaration
public string TooltipFormat { get; set; }
Property Value
Type |
Description |
System.String |
|
ValidationMessage
Declaration
public List<KeyValue> ValidationMessage { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<KeyValue> |
|
ValidationMessages
Declaration
public List<KeyValue> ValidationMessages { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<KeyValue> |
|
ValidationMsg
Declaration
[JsonProperty("validationMessage")]
protected Dictionary<string, object> ValidationMsg { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
ValidationMsgs
Declaration
[JsonProperty("validationMessages")]
protected Dictionary<string, object> ValidationMsgs { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
ValidationRule
Declaration
public List<KeyValue> ValidationRule { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<KeyValue> |
|
ValidationRules
Gets or sets the jQuery validation custom rules for date picker input.
Declaration
[JsonProperty("validationRules")]
public Dictionary<string, object> ValidationRules { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
Value
Gets or sets the date value in the date picker.
Declaration
public DateTime? Value { get; set; }
Property Value
Type |
Description |
System.Nullable<System.DateTime> |
|
WatermarkText
Gets or sets the place holder value for date picker input field.
Declaration
public string WatermarkText { get; set; }
Property Value
Type |
Description |
System.String |
|
WeekNumber
Gets or sets a value indicating the week number of every week in calendar in a new column of date picker.
Declaration
public bool WeekNumber { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Width
Gets or sets a value indicating the width of the date picker input field.
Declaration
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
DependentScripts()
Specifies the dependent scripts.
Declaration
public List<string> DependentScripts()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
GetDependentFiles()
Specifies the the dependent files.
Declaration
public override List<string> GetDependentFiles()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Overrides
LoadViewState(Object)
Declaration
protected override void LoadViewState(object state)
Parameters
Type |
Name |
Description |
System.Object |
state |
|
Overrides
OnPreRender(EventArgs)
Modifying server controls before sending them to the client.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
PostBackEventHandler(String, Dictionary<String, Object>)
Specifies the handler for server side events.
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
Type |
Name |
Description |
System.String |
EventName |
|
System.Collections.Generic.Dictionary<System.String, System.Object> |
args |
|
Overrides
Render()
Renders the date picker instance.
Declaration
Returns
Type |
Description |
System.String |
|
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
Overrides
UpdateServerModel(Dictionary<String, Object>)
Updates the server model with client model.
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
ClientModel |
|
Overrides
Events
FocusOut
Fired when focus out the date picker's input field.
Declaration
public event DatePicker.DatePickerFocusOutEventHandler FocusOut
Event Type
Select
Fired when the Date is selected.
Declaration
public event DatePicker.DatePickerSelectEventHandler Select
Event Type
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService