Fixed 12-hours clock format/parse bugs
Fixes api get/set methods

The set date methods were not working always due to broken 'padLeft' helper
function. Also refactored event triggering code.