var initDate = function() { function zeropad(num) { return num < 10 ? "0" + num : num } function padAll(text, sep) { return $.map( text.split(sep), function(value, index) { return zeropad(parseInt(value, 10)); } ).join(sep); } // Hack: the 3rd-party date/time picker expects a trigger button with no // child elements, causing bad behavior on our icon