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

Summary
A fully functional calendar control that display navigable month by month view. Months and years can be changes using back and forward arrows and a date can be selected.

Example
var calendarExample;

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();
calendarExample.Move(0, 0);
Methods
Initialize CompareDate SetDate GetDate ArrangeLayout

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 calendarExample;

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();
CompareDate ()

Summary
Compares two javascript datetime objects together using only the date part for the compariosn. Time is ignored completely by this method.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var calendarExample;
var dateOne;
var dateTwo;

// Set Dates
dateOne = new Date();
dateTwo = new Date();
dateTwo.setHours(dateTwo.getHours() + 1);

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();

// Show result
System.MessageBox("Calendar - Date Compare", calendarExample.CompareDate(dateOne, dateTo).toString());
SetDate (dateNew)

Summary
The SetDate method set the date currently selected by the calendar 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 calendar to display as selected.

Return Value
This method does not return a value.

Example
var calendarExample;

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();

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

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

Parameters
This method has no parameters.

Return Value
The current date selected by the calendar control.

Example
var calendarExample;

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();

// Show Date
System.MessageBox("Calendar Selected Date", calendarExample.GetDate.toString()));
ArrangeLayout ()

Summary
The ArrangeLayout method forces the calendar control to update and arrange it's child controls based on current sizes. This method is called internally when the parent control is resized or the view monthe is changed. The method is provided for utility only and does not need to be called under normal conditions.

Parameters
This method has no parameters.

Return Value
This method does not return a value.

Example
var calendarExample;

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();

// Force Arrangement
calendarExample.ArrangeLayout();
OnDateChanged (eventData) [Event]

Summary
The OnDateChange event is triggered when the selected date on this calendar 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 calendarExample;

// Create calendar
calendarExample = System.CreateObject("System.Controls.Calendar");
calendarExample.Initialize();

// Attach to date cahnge
calendarExample.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 professional solution providing Enterprise Level Multiple Store Fronts all managed from a single sign on