jquery-runner icon indicating copy to clipboard operation
jquery-runner copied to clipboard

Input text format to 00:00:00 instead of 00.00

Open nagyervin89 opened this issue 9 years ago • 1 comments

Is it possible after document is ready the selected input $("#runner") text will be initialized like this 00:00:00.00 or 00:00:00 instead of 00.00 ?

nagyervin89 avatar Aug 23 '15 06:08 nagyervin89

Yes, I also would like to have such a functionality. First it is also working with this function.

$('#time').runner({
        startAt:12034507,
        format:function(s,so)
        {
            var t = parseInt(s);
            var hour = Math.floor(t/3600000);
            t = t - hour*3600000;
            var min = Math.floor(t / 60000);
            t = t - min * 60000;
            var sec = Math.floor(t/1000);
            t = t - sec*1000;


            if(hour < 10)
            {
                hour="0"+hour;
            }
            if(min < 10)
            {
                min="0"+min;
            }
            if(sec < 10)
            {
                sec="0"+sec;
            }
            if(t < 10)
            {
                t="00"+t;
            }
            else if(t < 100)
            {
                t="0"+t;
            }

            return hour+":"+min+":"+sec+"."+t;

        }

});

bees4ever avatar Jan 31 '17 15:01 bees4ever