Skip to content

Commit 38ed60b

Browse files
committed
Update jquery-ui-timepicker-addon.js
Have added sean's changes, not really sure what actually changed in here.
1 parent 17c4f29 commit 38ed60b

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/jquery-ui-timepicker-addon.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
/*
2-
* jQuery Timepicker Addon
3-
* By: Trent Richardson [http://trentrichardson.com]
4-
*
5-
* Copyright 2013 Trent Richardson
6-
* You may use this project under MIT license.
7-
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
8-
*/
9-
1+
/*! jQuery Timepicker Addon - v1.6.1 - 2015-11-14
2+
* http://trentrichardson.com/examples/timepicker
3+
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
104
(function (factory) {
115
if (typeof define === 'function' && define.amd) {
126
define(['jquery', 'jquery-ui'], factory);
@@ -28,7 +22,7 @@
2822
*/
2923
$.extend($.ui, {
3024
timepicker: {
31-
version: "@@version"
25+
version: "1.6.1"
3226
}
3327
});
3428

@@ -291,7 +285,10 @@
291285
}
292286

293287
if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
294-
tp_inst._defaults.minDate = new Date();
288+
var coeff = 1000 * 60 * 5;
289+
var date = new Date(); //or use any other date
290+
var rounded = new Date(Math.round(date.getTime() / coeff) * coeff)
291+
tp_inst._defaults.minDate = rounded;
295292
}
296293
if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {
297294
tp_inst._defaults.maxDate = new Date();
@@ -2264,6 +2261,6 @@
22642261
/*
22652262
* Keep up with the version
22662263
*/
2267-
$.timepicker.version = "@@version";
2264+
$.timepicker.version = "1.6.1";
22682265

22692266
}));

0 commit comments

Comments
 (0)