Skip to content

Commit 7740c23

Browse files
Update to jquery 1.11.0, jquery-ui 1.10.4
1 parent d001df8 commit 7740c23

File tree

5 files changed

+56
-8
lines changed

5 files changed

+56
-8
lines changed

dist/index.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
.ebook .buyp a iframe{ margin-bottom: -5px; }
3939
</style>
4040

41-
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
41+
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" />
4242
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui-timepicker-addon.css" />
4343

4444
</head>
@@ -370,6 +370,12 @@ <h3>Other Options</h3>
370370
<dt>maxDateTime</dt>
371371
<dd><em>Default: null</em> - Date object of the maximum datetime allowed. Also Available as maxDate.</dd>
372372

373+
<dt>minTime</dt>
374+
<dd><em>Default: null</em> - String of the minimum time allowed. '8:00 am' will restrict to times after 8am</dd>
375+
376+
<dt>maxTime</dt>
377+
<dd><em>Default: null</em> - String of the maximum time allowed. '8:00 pm' will restrict to times before 8pm</dd>
378+
373379
<dt>parse</dt>
374380
<dd><em>Default: 'strict'</em> - How to parse the time string. Two methods are provided: 'strict' which must match the timeFormat exactly, and 'loose' which uses javascript's new Date(timeString) to guess the time. You may also pass in a function(timeFormat, timeString, options) to handle the parsing yourself, returning a simple object:
375381
<pre>{
@@ -939,8 +945,8 @@ <h3 id="utility_examples">Utilities</h3>
939945
</div>
940946

941947

942-
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
943-
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
948+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
949+
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
944950
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
945951
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
946952

dist/jquery-ui-timepicker-addon.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
microsecMax: 999,
7979
minDateTime: null,
8080
maxDateTime: null,
81+
maxTime: null,
82+
minTime: null,
8183
onSelect: null,
8284
hourGrid: 0,
8385
minuteGrid: 0,
@@ -114,6 +116,8 @@
114116
millisec_slider: null,
115117
microsec_slider: null,
116118
timezone_select: null,
119+
maxTime: null,
120+
minTime: null,
117121
hour: 0,
118122
minute: 0,
119123
second: 0,
@@ -660,6 +664,44 @@
660664
}
661665
}
662666

667+
if (dp_inst.settings.minTime!==null) {
668+
var tempMinTime=new Date("01/01/1970 " + dp_inst.settings.minTime);
669+
if (this.hour<tempMinTime.getHours()) {
670+
this.hour=this._defaults.hourMin=tempMinTime.getHours();
671+
this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
672+
} else if (this.hour===tempMinTime.getHours() && this.minute<tempMinTime.getMinutes()) {
673+
this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
674+
} else {
675+
if (this._defaults.hourMin<tempMinTime.getHours()) {
676+
this._defaults.hourMin=tempMinTime.getHours();
677+
this._defaults.minuteMin=tempMinTime.getMinutes();
678+
} else if (this._defaults.hourMin===tempMinTime.getHours()===this.hour && this._defaults.minuteMin<tempMinTime.getMinutes()) {
679+
this._defaults.minuteMin=tempMinTime.getMinutes();
680+
} else {
681+
this._defaults.minuteMin=0;
682+
}
683+
}
684+
}
685+
686+
if (dp_inst.settings.maxTime!==null) {
687+
var tempMaxTime=new Date("01/01/1970 " + dp_inst.settings.maxTime);
688+
if (this.hour>tempMaxTime.getHours()) {
689+
this.hour=this._defaults.hourMax=tempMaxTime.getHours();
690+
this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
691+
} else if (this.hour===tempMaxTime.getHours() && this.minute>tempMaxTime.getMinutes()) {
692+
this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
693+
} else {
694+
if (this._defaults.hourMax>tempMaxTime.getHours()) {
695+
this._defaults.hourMax=tempMaxTime.getHours();
696+
this._defaults.minuteMax=tempMaxTime.getMinutes();
697+
} else if (this._defaults.hourMax===tempMaxTime.getHours()===this.hour && this._defaults.minuteMax>tempMaxTime.getMinutes()) {
698+
this._defaults.minuteMax=tempMaxTime.getMinutes();
699+
} else {
700+
this._defaults.minuteMax=59;
701+
}
702+
}
703+
}
704+
663705
if (adjustSliders !== undefined && adjustSliders === true) {
664706
var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
665707
minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),

dist/jquery-ui-timepicker-addon.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/docs/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
</div>
55

66

7-
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
8-
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
7+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
8+
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
99
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
1010
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
1111

src/docs/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
.ebook .buyp a iframe{ margin-bottom: -5px; }
3939
</style>
4040

41-
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
41+
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" />
4242
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui-timepicker-addon.css" />
4343

4444
</head>

0 commit comments

Comments
 (0)