Advanced JavaScript Library
 
 
 
System.Controls.DatePicker
Home > Documentation > 3.0 Controls > System.Controls.DatePicker
Developed by Exbos Limited.

Summary
A fully functional date picker control that displays the current selected date and presents alert picker popup that is full navigable by the users. Months and years can be changes using back and forward arrows and a date can be selected.

Example
var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();
datePickerExample.Move(0, 0);
Methods
Initialize SetValue GetValue SetDate GetDate

Events
OnDateChanged

Initialize ()

Summary
The Initialize method is supported by all controls that inherit from the System.Controls.Control class. The method performs the actual creation of the control and the attachment to the document object model. The call is often overridden by its child classes to perform any additional object initialization that might be required.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();
SetValue (sValue)

Summary
The SetValue method set the date currently selected by the picker control. The set causes the view to update to the correct month and year as well as updating the visual on the date selected.

Parameters
Parameter Description
sValue The string format date to set the picker to display as selected.

Return Value
This method does not return a value.

Example
var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();

// Set Date to Today
datePickerExample.SetDate(new Date());
GetValue ()

Summary
The GetValue method returns the date currently selected by the picker GetValue control. The object returned is a javascript date object.

Parameters
This method has no parameters.

Return Value
The current date selected by the picker control in string format.

Example
var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();

// Show Date
System.MessageBox("Calendar Selected Date", datePickerExample.GetDate.toString()));
SetDate (dateNew)

Summary
The SetDate method set the date currently selected by the picker control. The set causes the view to update to the correct month and year as well as updating the visual on the date selected.

Parameters
Parameter Description
dateNew The date to set the picker to display as selected.

Return Value
This method does not return a value.

Example
var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();

// Set Date to Today
datePickerExample.SetDate(new Date());
GetDate ()

Summary
The GetDate method returns the date currently selected by the picker GetDate control. The object returned is a javascript date object.

Parameters
This method has no parameters.

Return Value
The current date selected by the picker control.

Example
var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();

// Show Date
System.MessageBox("Calendar Selected Date", datePickerExample.GetDate.toString()));
OnDateChanged (eventData) [Event]

Summary
The OnDateChange event is triggered when the selected date on this picker control is changed. The change can be from user input of from script.

Parameters
Parameter Description
eventData Object containing any data relevant to this event.

Return Value
This method does not return a value.

Example
// Create handling function
function EvOnDateChanged(eventData)
{
     // Do change work
}

var datePickerExample;

// Create picker
datePickerExample = System.CreateObject("System.Controls.Calendar");
datePickerExample.Initialize();

// Attach to date cahnge
datePickerExample.OnDateChanged.AddHandler(EvOnDateChanged);
 
Shopping Basket
Your shopping basket is currently empty.
 
 
RSS Feed   Powered By Commerce Cloud
This site is powered by the Commerce Cloud Engine. Copyright (c) 2009 Exbos Limited. All Rights Reserved. SiteMap   Cookie Policy
Web site design and layout by Exbos Ltd. Copyright (c) 2010 Exbos Ltd. All Rights Reserved.
Commerce Cloud the e-commerce platform built for flexibility