Fix unhandled exception when clicking input addons and don't pad hour.

When clicking an input addon I get an unhandled exception. I've added a check for template at the top to make sure that doesn't happen.

I also don't think adding leading zeroes to the hour is ideal unless explicitly requested.

This is for review/discussion - it works, but changes are obviously welcome! :)