Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
trentrichardson committed Sep 1, 2014
2 parents e130b66 + e797db2 commit 3c9065e
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 41 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ module.exports = function(grunt) {
options: {
specs: 'test/*_spec.js',
vendor: [
'http://code.jquery.com/jquery-1.10.1.min.js',
'http://code.jquery.com/ui/1.10.3/jquery-ui.min.js',
'http://code.jquery.com/jquery-1.11.1.min.js',
'http://code.jquery.com/ui/1.11.1/jquery-ui.min.js',
'http://github.com/searls/jasmine-fixture/releases/1.0.5/1737/jasmine-fixture.js'
]
}
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jqueryui-timepicker-addon",
"version": "1.4.6",
"version": "1.5.0",
"repository": {
"type": "git",
"url": "git://github.com/trentrichardson/jQuery-Timepicker-Addon.git"
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/jquery-ui-timepicker-addon-i18n.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! jQuery Timepicker Addon - v1.4.6 - 2014-08-09
/*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2014 Trent Richardson; Licensed MIT */

Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/jquery-ui-timepicker-addon-i18n.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 83 additions & 6 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ <h3>Requirements</h3>

<br />
<h3>Version</h3>
<p>Version 1.4.6</p>
<p>Version 1.5.0</p>

<p>Last updated on 2014-08-09</p>
<p>Last updated on 2014-09-01</p>
<p>jQuery Timepicker Addon is currently available for use in all personal or commercial projects under the MIT license.</p>
<p><a href="http://trentrichardson.com/Impromptu/MIT-LICENSE.txt" title="MIT License">MIT License</a></p>

Expand Down Expand Up @@ -525,6 +525,7 @@ <h2>Examples</h2>
<li><a href="#slider_examples" title="Slider Modifications">Slider Modifications</a></li>
<li><a href="#alt_examples" title="Alternate Field">Alternate Fields</a></li>
<li><a href="#rest_examples" title="Time Restraints">Time Restraints</a></li>
<li><a href="#range_examples" title="Time Ranges">Time Ranges</a></li>
<li><a href="#utility_examples" title="Utilities">Utilities</a></li>
</ul>

Expand Down Expand Up @@ -848,17 +849,20 @@ <h3 id="rest_examples">Time Restraints</h3>
</pre>
</div>


<h3 id="range_examples">Time Ranges</h3>

<!-- ============= example -->
<div class="example-container">
<p>Restrict a start and end date by using onSelect and onClose events for more control over functionality:</p>
<p>For more examples and advanced usage grab the <a href="http://trentrichardson.com/ebooks/handling-time/" title="Handling Time eBook">Handling Time eBook</a>.</p>
<div>
<input type="text" name="rest_example_4_start" id="rest_example_4_start" value="" />
<input type="text" name="rest_example_4_end" id="rest_example_4_end" value="" />
<input type="text" name="range_example_1_start" id="range_example_1_start" value="08/20/2014 09:22 -0400" />
<input type="text" name="range_example_1_end" id="range_example_1_end" value="08/21/2014 08:00 -0400" />
</div>
<pre>
var startDateTextBox = $('#rest_example_4_start');
var endDateTextBox = $('#rest_example_4_end');
var startDateTextBox = $('#range_example_1_start');
var endDateTextBox = $('#range_example_1_end');

startDateTextBox.datetimepicker({
timeFormat: 'HH:mm z',
Expand Down Expand Up @@ -894,6 +898,79 @@ <h3 id="rest_examples">Time Restraints</h3>
startDateTextBox.datetimepicker('option', 'maxDate', endDateTextBox.datetimepicker('getDate') );
}
});
</pre>
</div>

<!-- ============= example -->
<div class="example-container">
<p>Timepicker also includes some shortcut methods for ranges:</p>
<div>
<input type="text" name="range_example_2_start" id="range_example_2_start" value="21 Aug 2014 09:16" />
<input type="text" name="range_example_2_end" id="range_example_2_end" value="21 Aug 2014 10:16" />
</div>
<pre>
var startDateTextBox = $('#range_example_2_start');
var endDateTextBox = $('#range_example_2_end');

$.timepicker.datetimeRange(
startDateTextBox,
endDateTextBox,
{
minInterval: (1000*60*60), // 1hr
dateFormat: 'dd M yy',
timeFormat: 'HH:mm',
start: {}, // start picker options
end: {} // end picker options
}
);
</pre>
</div>

<!-- ============= example -->
<div class="example-container">
<p>To use only times for a time range use $.timepicker.timeRange():</p>
<div>
<input type="text" name="range_example_3_start" id="range_example_3_start" value="09:16" />
<input type="text" name="range_example_3_end" id="range_example_3_end" value="10:16" />
</div>
<pre>
var startTimeTextBox = $('#range_example_3_start');
var endTimeTextBox = $('#range_example_3_end');

$.timepicker.timeRange(
startTimeTextBox,
endTimeTextBox,
{
minInterval: (1000*60*60), // 1hr
timeFormat: 'HH:mm',
start: {}, // start picker options
end: {} // end picker options
}
);
</pre>
</div>

<!-- ============= example -->
<div class="example-container">
<p>Even though this plugin focuses on datetime, it also provides a dateRange function:</p>
<div>
<input type="text" name="range_example_4_start" id="range_example_4_start" value="" />
<input type="text" name="range_example_4_end" id="range_example_4_end" value="" />
</div>
<pre>
var startDateTextBox = $('#range_example_4_start');
var endDateTextBox = $('#range_example_4_end');

$.timepicker.dateRange(
startDateTextBox,
endDateTextBox,
{
minInterval: (1000*60*60*24*4), // 4 days
maxInterval: (1000*60*60*24*8), // 8 days
start: {}, // start picker options
end: {} // end picker options
}
);
</pre>
</div>

Expand Down
Loading

0 comments on commit 3c9065e

Please sign in to comment.