trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

Added new options to specify minTime and maxTime #692

Closed bodrick closed 10 years ago

bodrick commented 10 years ago

Added two new options so that minimum time and maximum time can be specified when selecting times. Very much different than the minDate/maxDate in that the time is restricted each day to the values specified.

trentrichardson commented 10 years ago

Hey @bodrick thanks a ton for this! If I'm thinking correctly this will be great!

To make sure I understand these changes, is this for when it is time only in the picker or used for date and time picker?

Also I noticed your documentation updates used am/pm, is this dependent on a particular time format?

I also noticed it picks out the hours and minutes, so I guess full implementation would need seconds, milliseconds, etc.. (believe it or not but a lot of users use these smaller units for applications..).

Have you tested with timezones to see if these are accurate? (this answer may be irrelevant if your changes are only for time only picker.)

Just asking these questions to get up to speed with your changes, not to nit pick or ask more work of you.

Thanks again! Trent

bodrick commented 10 years ago

So this is for when its either a time only picker (not tested), and a date and time picker (tested). I had made the changes to fill a need of my own and wanted to give back. I also noticed that a few others seemed to want similar functionality.

I will have to double check on the format of the time, since I'm using the javascript date object to parse the date/time string, I suspect it would work with 24 hour format, but I can verify that too.

Right now indeed it does only deal with hours and minutes, but I don't believe it will be hard to add seconds and milliseconds etc and I can certainly update my code to reflect those needs.

In regards to timezones I haven't tested it with timezones, but I'm not sure if it really becomes an issue since it really only manipulates the time portion anyway, but I can certainly double check.