set

Dual - Set the date

As a Trigger

This will set the date for the DateBox control.
$(input).trigger('datebox', {'method':'set', 'value':<STR Date>});
This is similar to "setTheDate", however, this traditionally expects a **formatted date string**, but will accept a Date() object. It is far, far preferable to use the "setTheDate" function.

As a Listener

This is recieved when the DateBox is set.
$(input).bind('datebox', function (e, passed) { 
  if ( passed.method === 'set' ) {
    alert('Formatted value is: ' + passed.value);
    alert('JavaScript Date object is: ' + passed.date);
  }
});
Return Values: - **value** - Formatted date string - **date** - JavaScript Date() object

Trigger / Listener

Trigger and Listener