Skip to content

Commit 9e816d4

Browse files
Merge branch 'dev'
2 parents c892bd3 + 6f973a9 commit 9e816d4

11 files changed

+82
-20
lines changed

Gruntfile.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = function(grunt) {
77
// Metadata.
88
pkg: grunt.file.readJSON('jquery-ui-timepicker-addon.json'),
99
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
10-
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
10+
//'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
11+
'<%= pkg.modified %>\n' +
1112
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
1213
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
1314
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
@@ -70,7 +71,7 @@ module.exports = function(grunt) {
7071
options: {
7172
variables: {
7273
version: '<%= pkg.version %>',
73-
timestamp: '<%= grunt.template.today("yyyy-mm-dd") %>'
74+
timestamp: '<%= pkg.modified %>'
7475
},
7576
prefix: '@@'
7677
},

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ I recommend getting the eBook [Handling Time](https://sellfy.com/p/8gxZ) as it h
1515
- Include timepicker-addon script located in the `dist` directory.
1616
- now use timepicker with `$('#selector').datetimepicker()` or `$('#selector').timepicker()`.
1717

18+
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.
19+
1820
Contributing Code - Please Read!
1921
--------------------------------
2022
- All code contributions and bug reports are much appreciated.

bower.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "jquery-timepicker-addon",
3-
"version": "1.4.1",
2+
"name": "jqueryui-timepicker-addon",
3+
"version": "1.4.2",
44
"repository": {
55
"type": "git",
66
"url": "git://github.com/trentrichardson/jQuery-Timepicker-Addon.git"

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

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Armenian translation for the jQuery Timepicker Addon */
2+
/* Written by Artavazd Avetisyan artavazda@hotmail.com */
3+
(function($) {
4+
$.timepicker.regional['am'] = {
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+
amNames: ['AM', 'A'],
17+
pmNames: ['PM', 'P'],
18+
isRTL: false
19+
};
20+
$.timepicker.setDefaults($.timepicker.regional['am']);
21+
})(jQuery);

dist/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ <h3>Requirements</h3>
124124

125125
<br />
126126
<h3>Version</h3>
127-
<p>Version 1.4.1</p>
127+
<p>Version 1.4.2</p>
128128

129-
<p>Last updated on 2013-11-10</p>
129+
<p>Last updated on 2013-11-23</p>
130130
<p>jQuery Timepicker Addon is currently available for use in all personal or commercial projects under the MIT license.</p>
131131
<p><a href="http://trentrichardson.com/Impromptu/MIT-LICENSE.txt" title="MIT License">MIT License</a></p>
132132

dist/jquery-ui-timepicker-addon.js

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Timepicker Addon - v1.4.1 - 2013-11-10
1+
/*! jQuery Timepicker Addon - v1.4.2 - 2013-11-23
22
* http://trentrichardson.com/examples/timepicker
33
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
44
(function ($) {
@@ -16,7 +16,7 @@
1616
*/
1717
$.extend($.ui, {
1818
timepicker: {
19-
version: "1.4.1"
19+
version: "1.4.2"
2020
}
2121
});
2222

@@ -744,15 +744,22 @@
744744
microsec = parseInt(microsec, 10);
745745
}
746746
if (timezone !== false) {
747-
timezone = parseInt(timezone, 10);
747+
timezone = timezone.toString();
748748
}
749749

750750
var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
751751

752752
// If the update was done in the input field, the input field should not be updated.
753753
// If the update was done using the sliders, update the input field.
754-
var hasChanged = (hour !== this.hour || minute !== this.minute || second !== this.second || millisec !== this.millisec || microsec !== this.microsec ||
755-
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone));
754+
var hasChanged = (
755+
hour !== parseInt(this.hour,10) || // sliders should all be numeric
756+
minute !== parseInt(this.minute,10) ||
757+
second !== parseInt(this.second,10) ||
758+
millisec !== parseInt(this.millisec,10) ||
759+
microsec !== parseInt(this.microsec,10) ||
760+
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
761+
(this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString()
762+
);
756763

757764
if (hasChanged) {
758765

@@ -799,6 +806,7 @@
799806
this.timeDefined = true;
800807
if (hasChanged) {
801808
this._updateDateTime();
809+
this.$input.focus();
802810
}
803811
},
804812

@@ -2132,6 +2140,6 @@
21322140
/*
21332141
* Keep up with the version
21342142
*/
2135-
$.timepicker.version = "1.4.1";
2143+
$.timepicker.version = "1.4.2";
21362144

21372145
})(jQuery);

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

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

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

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

jquery-ui-timepicker-addon.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "jquery-ui-timepicker-addon",
33
"title": "jQuery Timepicker Addon",
44
"description": "A timepicker addon for jQueryUI datepicker.",
5-
"version": "1.4.1",
5+
"version": "1.4.2",
6+
"modified": "2013-11-23",
67
"homepage": "http://trentrichardson.com/examples/timepicker",
78
"author": {
89
"name": "Trent Richardson",

src/i18n/jquery-ui-timepicker-am.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Armenian translation for the jQuery Timepicker Addon */
2+
/* Written by Artavazd Avetisyan artavazda@hotmail.com */
3+
(function($) {
4+
$.timepicker.regional['am'] = {
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+
amNames: ['AM', 'A'],
17+
pmNames: ['PM', 'P'],
18+
isRTL: false
19+
};
20+
$.timepicker.setDefaults($.timepicker.regional['am']);
21+
})(jQuery);

src/jquery-ui-timepicker-addon.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -750,15 +750,22 @@
750750
microsec = parseInt(microsec, 10);
751751
}
752752
if (timezone !== false) {
753-
timezone = parseInt(timezone, 10);
753+
timezone = timezone.toString();
754754
}
755755

756756
var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
757757

758758
// If the update was done in the input field, the input field should not be updated.
759759
// If the update was done using the sliders, update the input field.
760-
var hasChanged = (hour !== this.hour || minute !== this.minute || second !== this.second || millisec !== this.millisec || microsec !== this.microsec ||
761-
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone));
760+
var hasChanged = (
761+
hour !== parseInt(this.hour,10) || // sliders should all be numeric
762+
minute !== parseInt(this.minute,10) ||
763+
second !== parseInt(this.second,10) ||
764+
millisec !== parseInt(this.millisec,10) ||
765+
microsec !== parseInt(this.microsec,10) ||
766+
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
767+
(this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString()
768+
);
762769

763770
if (hasChanged) {
764771

@@ -805,6 +812,7 @@
805812
this.timeDefined = true;
806813
if (hasChanged) {
807814
this._updateDateTime();
815+
this.$input.focus();
808816
}
809817
},
810818

0 commit comments

Comments
 (0)