igDateEditor
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)
The igDateEditor control includes a host of configuration options to help you format and constrain the date data coming from input forms.
- C#
- VB.NET
public class igDateEditor : igBase
Public Class igDateEditor
Inherits igBase
Constructors
igDateEditor()
Constructs a new instance of the igDateEditor class.
Example:
The following example creates a date editor and configures it through the Options object.
var editor = new igDateEditor();
editor.Options.value = DateTime.Today;
editor.Options.dateInputFormat = "dd/MM/yyyy";
editor.Size = new Size(200, 30);
this.Controls.Add(editor);
igDateEditor(options)
Constructs a new instance of the igDateEditor class using the specified options.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options passed to the igDateEditor widget: an anonymous object, a JSON string or a dynamic object. |
Example:
The following example creates a date editor that accepts only the dates in the current year and reads the date entered by the user from the widget.
var editor = new igDateEditor(new
{
value = DateTime.Today,
dateInputFormat = "dd/MM/yyyy",
minValue = new DateTime(DateTime.Today.Year, 1, 1),
maxValue = new DateTime(DateTime.Today.Year, 12, 31),
buttonType = "spin"
});
this.Controls.Add(editor);
// later, i.e. in a button click handler.
var date = await editor.Instance.valueAsync();