//For example, using:
var a = tpc.forms[0].TpcDateTime.add_valueChanged(function()
{
console.log( this.get_value());
});
//will output the selected value of the widget to the console as soon as the value changes. All delegates must be set with a variable. This way you can easily remove this delegate from any widget by using:
tpc.forms[0].TpcDateTime.remove_valueChanged(a);