Timepicker Functions

First working version ready.