mugifly / jquery-simple-datetimepicker

Date & time picker for jQuery, It's simple & clean.
http://mugifly.github.com/jquery-simple-datetimepicker
Other
259 stars 181 forks source link

+ add min, max value for hour #79

Closed IShumihin closed 9 years ago

henriquelbsouza commented 11 years ago

Awesome! I came here to suggest/implement this.

I will do some tests when I have time. Thanks!

LucasTheCure commented 11 years ago

I've just checked you commit, the "for (var hour =..." statement code is very long, and make it unreadable. It is not a good practice. I'll test it in my fork.

IShumihin commented 11 years ago

I can change it, like here https://github.com/mugifly/jquery-simple-datetimepicker/blob/master/jquery.simple-dtpicker.js#L716

Sorry for my bad English. Can you give me advice? I do not know how to change the attributes in already created object. I watched your example http://mugifly.github.io/jquery-simple-datetimepicker/jquery.simple-dtpicker.html (It's will also useful for use with two input-fields.) and would like to use the date of the first object as "current" to the second object. Thank you!

2013/11/1 LucasTheCure notifications@github.com

I've just checked you commit, the "for (var hour =..." statement code is very long, and make it unreadable. It is not a good practice. I'll test it in my fork.

Reply to this email directly or view it on GitHubhttps://github.com/mugifly/jquery-simple-datetimepicker/pull/79#issuecomment-27565919 .

Ó Õ×ÁÖÅÎÉÅÍ, é×ÁÎ ûÕÍÉÈÉÎ

LucasTheCure commented 11 years ago

Sorry, I cant help you with inputs problem, in fact examples are not mine.

In my opinion min and max values only for hour are fine, but may be not enough for all cases. So I decided to add "startTime", "endTime" that allows define hours and minutes like "15:18" Also "minuteInterval" was limited to range [5..30] what caused problems with declaring for instance 2 hours intervals.

Above limitations are fixed in my fork.

royzrj commented 9 years ago

@muglify do you need help merging this commit?

mugifly commented 9 years ago

Now we can set a time range with using minTime and maxTime option, as same with LucasTheCure's approach. Thanks for opinions.