2022.2

Table Of Contents
Field Description
save-state.cotg
SavesthesignaturedatatothelocalstorageoftheCOTGapp.
set.cotg
Setsthegivensignature.ThesignatureshouldbegivenasanSVGstring,forexample:
$(“#signature”).trigger(“set.cotg”, “<svg>…</svg>”);
TheSignatureelementbroadcaststhefollowingevents.
Field Description
set.cotg This event is fired after a user has entered a signature and clicked the Done button of the Signature win-
dow on the device.
clear.cotg
FiredafterauserhasclickedtheDonebuttonoftheSignaturewindowwithoutenteringasignature.
draw.cotg
Firedeachtimethesignatureisdrawnontheform(bytheapp,notbytheuser;e.g.afteraset.cotgorrestore-state.cotg
event).
TimeandFormattedTime
cotgTimePicker()
Initializinganew(Formatted)Timeelementpreparesitforuserinteraction.
Example: $('#myTimePicker').cotgTimePicker();
NotethatthedifferencebetweenaTimeandaFormattedTimeislaiddownintheHTMLstructureof
theelement.
Events
TheTimeandFormattedTimeelementslisten forthefollowingcustomevents.
Event Description
set.cotg Stores the given time (specified in a Date object).
clear.cotg
Removesthesettime.
show-time-picker.cotg
OpenstheTimePicker.Ifnotimeisprovided(specifiedinaDateobject),thecurrenttimewillbeshown.
Page 565