bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

[New Feature] Timepicker should support setting the seconds

Open zsong opened this issue 13 years ago • 14 comments

Timepicker should support setting the seconds.

zsong avatar Nov 05 '13 21:11 zsong

Your flight is scheduled for Jan 2nd, 2014, at precisely 17.563 seconds after 4:36pm.

(But in all seriousness, I don't see why not, except that it's really awkward to do this from a UI perspective without the help of native mobile date/time widgets that do a much better job at this sort of thing)

caitp avatar Nov 05 '13 22:11 caitp

@caitp Obviously it doesn't apply to your example

It will be useful in data analysis or use cases relating to time specific stuff.

And this should be configurable to show or not.

zsong avatar Nov 05 '13 22:11 zsong

I agree, I'm not saying people wouldn't find it useful.

I just think that coming up with a good, usable UI that doesn't suck is a major difficulty. I wrote a blog a few months back about how terrible most of the time-pickers (apart from native html5 time pickers on mobile devices) tended to be, it is really not a happy thing :(

caitp avatar Nov 05 '13 22:11 caitp

@zsong I'm not sure I'm super keen on adding seconds field. The current directive is quite extensible so you can easily add it on your end and eventually send a pull request when done. Closing for now, ready to re-consider if there is more demand.

pkozlowski-opensource avatar Nov 09 '13 17:11 pkozlowski-opensource

I see now why you are super keen :), but yeah it's very easy. I can help if anyone wants it, to make seconds optional the logic needs to be rethought so it takes the adequate functions to add/sub time. I hope I can stop be lazy and do a pull req.

zordon avatar Dec 12 '13 20:12 zordon

+1 has anyone implemented this already? I think it has many uses and I am not sure why it wouldn't be included in the release version. Seconds are an important part of 'Time' :)

If no one answers that they have done it, I will attempt to if it doesn't take too much of my time, and will fork the repo.

rconrad avatar Jan 14 '14 17:01 rconrad

@zordon @rconrad Go ahead. I am getting lazy and you guys can do it for sure. Thx!

zsong avatar Jan 14 '14 18:01 zsong

I already did, and I think I did a commit on a fork already on my profile, only for my personal requirements.

the only TODO might be to make it optional.

zordon avatar Jan 14 '14 18:01 zordon

also hope it becomes an option in next release.

jackniu81 avatar Jan 28 '14 04:01 jackniu81

+1 my use case is someone setting fitness goals. they want to be able to run 100mtrs for example in a certain time. seconds are more than necessary. if anyone has a link to an example of seconds being added to the current angular-ui timepicker I would like to see it as I have an immediate need for this.

MarkRBM avatar Feb 22 '14 00:02 MarkRBM

@pkozlowski-opensource also time can be two things a time ie it is 12 o'clock or a measurement ie 2 hours long. why does the time picker only allow for the former? what is the reasoning behind including a date with the value?

MarkRBM avatar Feb 22 '14 01:02 MarkRBM

+1 for seconds ... same use case as @Ir1sh

mfgmk avatar Mar 25 '14 22:03 mfgmk

+1

konsultaner avatar Oct 24 '14 08:10 konsultaner

@richidd Please see #2326 for tracking this

antoinepairet avatar Jan 11 '15 11:01 antoinepairet