I am using trent richardson’s timepicker and I want to format my time so it looks like this below:
00 Hrs 00 Mins 00 Secs
At the moment my time format code is this: timeFormat:'hh:mm:ss', which displays 00:00:00
Now I tried timeFormat:'hh Hours mm Mins ss Secs', but it displays this 00 Hr0 00 Min0 00 Sec0.
This is because 's' in the time Format code is part of seconds so it will display 0.
So for me to be able to format the time to the way i want it, is there a way I can use concatenation to join the time format and strings together? for example timeFormat:'hh' + Hrs + 'mm' + Mins ... for example, or do I have to hack into js source code and change ‘s’ ans ‘ss’ to something else. I don’t really want to hack into js file because then it will make the code seem bit meaningless (for example if I change 's' to 'q', if someone reads q they won’t know what it means).
Thanks
timepicker website is here if you want to look at it: click here
Alright, with a bit of hard work I may have found a solution.
In the addon file replace lines 856 to 860 by this code :
In your JS set the timeFormat to “hh mm ss”… and it should it work !
Carefull though… You’ll always have the “Hours”, “Mins” and “Secs” appearing !!