1.8

Table Of Contents
Date and Formatted Date
cotgDatePicker()
Initializing a Date or Formatted Date element prepares it for user interaction.
Example: $('myDatePicker').cotgDatePicker();
Note that the difference between a Date and a Formatted Date is laid down in the HTML
structure of the element.
Events
The Date and Formatted Date elements listen for the following custom events.
Event Description
clear.cotg Removes the date.
set.cotg
Sets the given date. The date should be given as a Date object, for
example:
$("#date").trigger("set.cotg", new Date()); // set current date
show-date-
picker.cotg
Opens the Date picker. Optionally, you can provide a date (as a Date
object) for the Date picker to be opened with, for example:
$('#date1').trigger("show-date-picker.cotg", new Date
("2018-01-01"));
Device Info
cotgDeviceInfo()
Initializing a Device Info element puts information about the device (phone or tablet) that
displays the form, in the hidden input of the element.
Example: $('#myDeviceInfo').cotgDeviceInfo();
Events
The Device Info element listens for the following event.
Page 457