Skip to main content

DatePicker

Namespace: Wisej.Web.Ext.MobiScroll

Assembly: Wisej.Web.Ext.MobiScroll (4.1.0.0)

The Mobiscroll Datepicker component lets you select a date, a time, or a range of dates using a calendar or scroller wheels.

public class DatePicker : MSComponentBase

The component is created in the browser on the first child control of the control assigned to Control, using the options that are set at that time.

Constructors​

Instance member DatePicker()​

Constructs a new instance of the DatePicker class.

This constructor leaves Options set to null: assign a new options object before setting Control.

Example:

The following example creates a date picker, assigns the options and attaches it to a panel that contains the target control.

var picker = new DatePicker();
picker.Options = new
{
controls = new[] { "calendar" },
display = "inline"
};
picker.Control = this.panelDate;

Instance member DatePicker(options)​

Constructs a new instance of the DatePicker class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a picker that selects a range of dates and handles the MobiScroll onChange event.

var picker = new DatePicker(new
{
controls = new[] { "calendar" },
select = "range",
display = "inline"
});
picker.WidgetEvent += (s, e) =>
{
if (e.Type == "onChange")
this.labelRange.Text = e.Data.valueText;
};
picker.Control = this.panelDate;

Implements​