Skip to content

Commit 6326708

Browse files
committed
Merge pull request #1 from trentrichardson/master
update from original
2 parents 8c597e8 + 17c4f29 commit 6326708

21 files changed

+398
-88
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,28 @@ I recommend getting the eBook [Handling Time](https://sellfy.com/p/8gxZ) as it h
1919

2020
There is also a [Bower](http://bower.io/) package named `jqueryui-timepicker-addon`. Beware there are other similar package names that point to forks which may not be current.
2121

22+
Rails with Bower
23+
-----------------
24+
If you happen to use Rails with the [bower](gem "bower-rails", "~> 0.8.3") gem, here it is to use it easily :
25+
#### Bowerfile
26+
```asset "jqueryui-timepicker-addon", "1.5.6"```
27+
28+
#### application.js
29+
```javascript
30+
//= require jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon
31+
//= require jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-fr
32+
```
33+
34+
#### application.css.scss
35+
```scss
36+
@import "jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.css";
37+
```
38+
2239
Contributing Code - Please Read!
2340
--------------------------------
2441
- All code contributions and bug reports are much appreciated.
2542
- Please be sure to apply your fixes to the "dev" branch.
2643
- Also note tabs are appreciated over spaces.
2744
- Please read the [CONTRIBUTING.md][contributingmd] for more on using Grunt to produce builds.
2845

29-
[contributingmd]: CONTRIBUTING.md
46+
[contributingmd]: CONTRIBUTING.md

bower.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"name": "jqueryui-timepicker-addon",
3-
"version": "1.5.2",
43
"repository": {
54
"type": "git",
65
"url": "git://github.com/trentrichardson/jQuery-Timepicker-Addon.git"
76
},
7+
"main": ["dist/jquery-ui-timepicker-addon.js", "dist/jquery-ui-timepicker-addon.css"],
8+
"ignore": [
9+
],
810
"dependencies": {
911
}
1012
}

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

+45-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Timepicker Addon - v1.5.2 - 2015-03-15
1+
/*! jQuery Timepicker Addon - v1.6.1 - 2015-11-14
22
* http://trentrichardson.com/examples/timepicker
33
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
44

@@ -248,6 +248,28 @@
248248
isRTL: false
249249
};
250250

251+
// source: src/i18n/jquery-ui-timepicker-fa.js
252+
/* Persian translation for the jQuery Timepicker Addon */
253+
/* Written by Meysam Pour Ganji */
254+
255+
$.timepicker.regional['fa'] = {
256+
timeOnlyTitle: 'انتخاب زمان',
257+
timeText: 'زمان',
258+
hourText: 'ساعت',
259+
minuteText: 'دقیقه',
260+
secondText: 'ثانیه',
261+
millisecText: 'میلی ثانیه',
262+
microsecText: 'میکرو ثانیه',
263+
timezoneText: 'منطقه زمانی',
264+
currentText: 'الان',
265+
closeText: 'انتخاب',
266+
timeFormat: 'HH:mm',
267+
timeSuffix: '',
268+
amNames: ['قبل ظهر', 'AM', 'A'],
269+
pmNames: ['بعد ظهر', 'PM', 'P'],
270+
isRTL: true
271+
};
272+
251273
// source: src/i18n/jquery-ui-timepicker-fi.js
252274
/* Finnish translation for the jQuery Timepicker Addon */
253275
/* Written by Juga Paazmaya (http://github.com/paazmaya) */
@@ -512,6 +534,28 @@
512534
isRTL: false
513535
};
514536

537+
// source: src/i18n/jquery-ui-timepicker-mk.js
538+
/* Macedonian cyrilic translation for the jQuery Timepicker Addon */
539+
/* Written by Vlatko Ristovski */
540+
541+
$.timepicker.regional['mk'] = {
542+
timeOnlyTitle: 'Одберете време',
543+
timeText: 'Време',
544+
hourText: 'Час',
545+
minuteText: 'Минути',
546+
secondText: 'Секунди',
547+
millisecText: 'Милисекунди',
548+
microsecText: 'Микросекунди',
549+
timezoneText: 'Временска зона',
550+
currentText: 'Сега',
551+
closeText: 'Затвори',
552+
timeFormat: 'HH:mm',
553+
timeSuffix: '',
554+
amNames: ['AM', 'A'],
555+
pmNames: ['PM', 'P'],
556+
isRTL: false
557+
};
558+
515559
// source: src/i18n/jquery-ui-timepicker-nl.js
516560
/* Dutch translation for the jQuery Timepicker Addon */
517561
/* Written by Martijn van der Lee */

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

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/i18n/jquery-ui-timepicker-fa.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Persian translation for the jQuery Timepicker Addon */
2+
/* Written by Meysam Pour Ganji */
3+
(function($) {
4+
$.timepicker.regional['fa'] = {
5+
timeOnlyTitle: 'انتخاب زمان',
6+
timeText: 'زمان',
7+
hourText: 'ساعت',
8+
minuteText: 'دقیقه',
9+
secondText: 'ثانیه',
10+
millisecText: 'میلی ثانیه',
11+
microsecText: 'میکرو ثانیه',
12+
timezoneText: 'منطقه زمانی',
13+
currentText: 'الان',
14+
closeText: 'انتخاب',
15+
timeFormat: 'HH:mm',
16+
timeSuffix: '',
17+
amNames: ['قبل ظهر', 'AM', 'A'],
18+
pmNames: ['بعد ظهر', 'PM', 'P'],
19+
isRTL: true
20+
};
21+
$.timepicker.setDefaults($.timepicker.regional['fa']);
22+
})(jQuery);

dist/i18n/jquery-ui-timepicker-mk.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Macedonian cyrilic translation for the jQuery Timepicker Addon */
2+
/* Written by Vlatko Ristovski */
3+
(function($) {
4+
$.timepicker.regional['mk'] = {
5+
timeOnlyTitle: 'Одберете време',
6+
timeText: 'Време',
7+
hourText: 'Час',
8+
minuteText: 'Минути',
9+
secondText: 'Секунди',
10+
millisecText: 'Милисекунди',
11+
microsecText: 'Микросекунди',
12+
timezoneText: 'Временска зона',
13+
currentText: 'Сега',
14+
closeText: 'Затвори',
15+
timeFormat: 'HH:mm',
16+
timeSuffix: '',
17+
amNames: ['AM', 'A'],
18+
pmNames: ['PM', 'P'],
19+
isRTL: false
20+
};
21+
$.timepicker.setDefaults($.timepicker.regional['mk']);
22+
})(jQuery);

dist/index.html

+45-23
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,9 @@ <h4>Subscribe to Blog and Twitter</h4>
9696
<br />
9797

9898
<h3>Download</h3>
99-
<p><a href="jquery-ui-timepicker-addon.js" title="Download Timepicker Addon">Download Timepicker Addon</a></p>
99+
<p><a href="jquery-ui-timepicker-addon.js" title="Download Timepicker Addon">Download Timepicker Addon</a> and the <a href="jquery-ui-timepicker-addon.css" title="Download CSS">required CSS</a>.</p>
100+
100101
<p><a href="http://github.com/trentrichardson/jQuery-Timepicker-Addon" title="Check out Timepicker on GitHub">Download/Contribute on GitHub</a> (Need the entire repo? Find a bug? See if its fixed here)</p>
101-
<p>There is a small bit of required CSS (<a href="jquery-ui-timepicker-addon.css" title="Download CSS">Download</a>):</p>
102-
<pre>/* css for timepicker */
103-
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
104-
.ui-timepicker-div dl { text-align: left; }
105-
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
106-
.ui-timepicker-div dl dd { margin: 0 10px 10px 45%; }
107-
.ui-timepicker-div td { font-size: 90%; }
108-
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
109-
110-
.ui-timepicker-rtl{ direction: rtl; }
111-
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
112-
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
113-
.ui-timepicker-rtl dl dd { margin: 0 45% 10px 10px; }
114-
</pre>
115102

116103
<p>If you prefer a hosted CDN there are a couple available: <a href="http://cdnjs.com/libraries/jquery-ui-timepicker-addon" title="Timepicker on CDNJS">CDNJS</a>, <a href="http://www.jsdelivr.com/#!jquery.ui.timepicker.addon" title="Timepicker on jsDelivr">jsDelivr</a>.</p>
117104
<br />
@@ -126,9 +113,9 @@ <h3>Requirements</h3>
126113

127114
<br />
128115
<h3>Version</h3>
129-
<p>Version 1.5.2</p>
116+
<p>Version 1.6.1</p>
130117

131-
<p>Last updated on 2015-03-15</p>
118+
<p>Last updated on 2015-11-14</p>
132119
<p>jQuery Timepicker Addon is currently available for use in all personal or commercial projects under the MIT license.</p>
133120
<p><a href="http://trentrichardson.com/Impromptu/MIT-LICENSE.txt" title="MIT License">MIT License</a></p>
134121

@@ -338,7 +325,10 @@ <h3>Other Options</h3>
338325
<dl class="defs">
339326
<dt>showButtonPanel</dt>
340327
<dd><em>Default: true</em> - Whether to show the button panel at the bottom. This is generally needed.</dd>
341-
328+
329+
<dt>timeInput</dt>
330+
<dd><em>Default: false</em> - Allows direct input in time field</dd>
331+
342332
<dt>timeOnly</dt>
343333
<dd><em>Default: false</em> - Hide the datepicker and only provide a time interface.</dd>
344334

@@ -530,6 +520,7 @@ <h2>Examples</h2>
530520
<li><a href="#timezone_examples" title="Using Timezones">Using Timezones</a></li>
531521
<li><a href="#slider_examples" title="Slider Modifications">Slider Modifications</a></li>
532522
<li><a href="#alt_examples" title="Alternate Field">Alternate Fields</a></li>
523+
<li><a href="#input_examples" title="Time Input">Time Input</a></li>
533524
<li><a href="#rest_examples" title="Time Restraints">Time Restraints</a></li>
534525
<li><a href="#range_examples" title="Time Ranges">Time Ranges</a></li>
535526
<li><a href="#utility_examples" title="Utilities">Utilities</a></li>
@@ -808,7 +799,7 @@ <h3 id="alt_examples">Alternate Fields</h3>
808799
});
809800
</pre>
810801
</div>
811-
802+
812803
<!-- ============= example -->
813804
<div class="example-container">
814805
<p>With inline mode using altField:</p>
@@ -821,6 +812,38 @@ <h3 id="alt_examples">Alternate Fields</h3>
821812
altField: "#alt_example_4_alt",
822813
altFieldTimeOnly: false
823814
});
815+
</pre>
816+
</div>
817+
818+
<h3 id="input_examples">Time Input</h3>
819+
820+
<!-- ============= example -->
821+
<div class="example-container">
822+
<p>Allows time displayed inside the picker to allow being typed in.</p>
823+
<div>
824+
<input type="text" name="input_example_1" id="input_example_1" value="08/20/2014 01:22 pm" />
825+
</div>
826+
<pre>
827+
$('#input_example_1').datetimepicker({
828+
timeInput: true,
829+
timeFormat: "hh:mm tt"
830+
});
831+
</pre>
832+
</div>
833+
834+
<!-- ============= example -->
835+
<div class="example-container">
836+
<p>Don't show any sliders, only the time input.</p>
837+
<div>
838+
<input type="text" name="input_example_1" id="input_example_2" value="08/20/2014 01:22 pm" />
839+
</div>
840+
<pre>
841+
$('#input_example_2').datetimepicker({
842+
timeInput: true,
843+
timeFormat: "hh:mm tt",
844+
showHour: false,
845+
showMinute: false
846+
});
824847
</pre>
825848
</div>
826849

@@ -925,8 +948,8 @@ <h3 id="range_examples">Time Ranges</h3>
925948
<div class="example-container">
926949
<p>Timepicker also includes some shortcut methods for ranges:</p>
927950
<div>
928-
<input type="text" name="range_example_2_start" id="range_example_2_start" value="21 Aug 2014 09:16" />
929-
<input type="text" name="range_example_2_end" id="range_example_2_end" value="21 Aug 2014 10:16" />
951+
<input type="text" name="range_example_2_start" id="range_example_2_start" value="" />
952+
<input type="text" name="range_example_2_end" id="range_example_2_end" value="" />
930953
</div>
931954
<pre>
932955
var startDateTextBox = $('#range_example_2_start');
@@ -1062,9 +1085,8 @@ <h3 id="utility_examples">Utilities</h3>
10621085
$.datepicker.parseTime('HH:mm:ss:l z', "14:36:21:765 +2000", {})
10631086
));
10641087
</pre>
1065-
</div>
1066-
10671088
</div>
1089+
10681090
</div>
10691091

10701092

dist/jquery-ui-timepicker-addon.css

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
77
.ui-timepicker-div .ui_tpicker_unit_hide{ display: none; }
88

9+
.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input { background: none; color: inherit; border: none; outline: none; border-bottom: solid 1px #555; width: 95%; }
10+
.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus { border-bottom-color: #aaa; }
11+
912
.ui-timepicker-rtl{ direction: rtl; }
1013
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
1114
.ui-timepicker-rtl dl dt{ float: right; clear: right; }

0 commit comments

Comments
 (0)