Skip to content

Commit 842046c

Browse files
Merge branch 'dev'
2 parents 9e816d4 + a8bce5f commit 842046c

9 files changed

+33
-15
lines changed

bower.json

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

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.2</p>
127+
<p>Version 1.4.3</p>
128128

129-
<p>Last updated on 2013-11-23</p>
129+
<p>Last updated on 2013-11-30</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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Timepicker Addon - v1.4.2 - 2013-11-23
1+
/*! jQuery Timepicker Addon - v1.4.3 - 2013-11-30
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.2"
19+
version: "1.4.3"
2020
}
2121
});
2222

@@ -1605,7 +1605,7 @@
16051605
// object will only return the timezone offset for the current locale, so we
16061606
// adjust it accordingly. If not using timezone option this won't matter..
16071607
// If a timezone is different in tp, keep the timezone as is
1608-
if (tp_inst) {
1608+
if (tp_inst && tp_date) {
16091609
// look out for DST if tz wasn't specified
16101610
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
16111611
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
@@ -2140,6 +2140,6 @@
21402140
/*
21412141
* Keep up with the version
21422142
*/
2143-
$.timepicker.version = "1.4.2";
2143+
$.timepicker.version = "1.4.3";
21442144

21452145
})(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-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +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.2",
6-
"modified": "2013-11-23",
5+
"version": "1.4.3",
6+
"modified": "2013-11-30",
77
"homepage": "http://trentrichardson.com/examples/timepicker",
88
"author": {
99
"name": "Trent Richardson",

src/jquery-ui-timepicker-addon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@
16111611
// object will only return the timezone offset for the current locale, so we
16121612
// adjust it accordingly. If not using timezone option this won't matter..
16131613
// If a timezone is different in tp, keep the timezone as is
1614-
if (tp_inst) {
1614+
if (tp_inst && tp_date) {
16151615
// look out for DST if tz wasn't specified
16161616
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
16171617
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;

test/SpecRunner.html

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
<link rel="shortcut icon" type="image/png" href="../lib/jasmine-1.3.1/jasmine_favicon.png">
99
<link rel="stylesheet" type="text/css" href="../lib/jasmine-1.3.1/jasmine.css">
10+
<style>
11+
.ui-datepicker {
12+
display: none;
13+
}
14+
</style>
1015
<script type="text/javascript" src="../lib/jasmine-1.3.1/jasmine.js"></script>
1116
<script type="text/javascript" src="../lib/jasmine-1.3.1/jasmine-html.js"></script>
1217
<script type="text/javascript" src="http://github.com/searls/jasmine-fixture/releases/1.0.5/1737/jasmine-fixture.js"></script>

test/jquery-ui-timepicker-addon_spec.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -648,4 +648,17 @@ describe('datetimepicker', function() {
648648
});
649649
});
650650
});
651-
});
651+
652+
describe('methods', function() {
653+
describe('setDate', function() {
654+
it('should accept null as date', function() {
655+
var $input = affix('input').datetimepicker();
656+
$input.datetimepicker('setDate', '2013-11-25 15:30:25');
657+
658+
$input.datetimepicker('setDate', null);
659+
660+
expect($input.datetimepicker('getDate')).toBeNull();
661+
});
662+
});
663+
});
664+
});

0 commit comments

Comments
 (0)