ejDatePicker
Namespace: Wisej.Web.Ext.Syncfusion
Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)
Input field that display the DatePicker calendar as popup to select and set the date value
- C#
- VB.NET
public class ejDatePicker : ejBase
Public Class ejDatePicker
Inherits ejBase
Constructors
ejDatePicker()
Constructs a new instance of the ejDatePicker class.
Example:
The following example creates the date picker and sets the format and the date through the options.
var datePicker = new ejDatePicker();
datePicker.Options.dateFormat = "dd/MM/yyyy";
datePicker.Options.value = "25/12/2025";
datePicker.Location = new Point(20, 20);
this.Controls.Add(datePicker);
ejDatePicker(options)
Constructs a new instance of the ejDatePicker class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a date picker that shows a watermark and highlights the weekends.
var datePicker = new ejDatePicker(new
{
dateFormat = "MM/dd/yyyy",
watermarkText = "Select the delivery date",
highlightWeekend = true
});
this.Controls.Add(datePicker);
Properties
Text
String: Gets or sets the text for the ejDatePicker. (Default: "")
The property reads and writes the value option of the widget, which is the date formatted according to the dateFormat option, and raises the TextChanged event every time it is assigned. It is not updated when the user selects a date in the browser: handle the change event of the widget to receive the date selected by the user.
Example:
// set the date using the format defined in the dateFormat option.
this.datePicker1.Options.dateFormat = "dd/MM/yyyy";
this.datePicker1.Text = "25/12/2025";
// receive the date selected by the user.
this.datePicker1.Instance.onChange += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Selected date: {e.Data.value}");
});