aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-05-07 05:58:06 +0900
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-05-07 06:03:14 +0900
commit2063a113d6dbae006413896a93d46a34ebc9b155 (patch)
tree7f11fa0bf7703a973f051699b66f43e6d5137c59 /tests
parent476777f1e926d56547291abda642683513f92610 (diff)
downloadjquery-ui-2063a113d6dbae006413896a93d46a34ebc9b155.tar.gz
jquery-ui-2063a113d6dbae006413896a93d46a34ebc9b155.zip
Datepicker: onClose callback should be triggered by show. Fixed #6656 - onClose event not triggered.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/datepicker/datepicker.html1
-rw-r--r--tests/unit/datepicker/datepicker_events.js5
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker.html b/tests/unit/datepicker/datepicker.html
index fa346c6c9..d0c2c8c8c 100644
--- a/tests/unit/datepicker/datepicker.html
+++ b/tests/unit/datepicker/datepicker.html
@@ -49,6 +49,7 @@
<div id="qunit-fixture">
<p><input type="text" id="inp"/><input type="text" id="alt"/><div id="inl"></div></p>
+ <p><input type="text" id="inp2"/></p>
</div>
</body>
diff --git a/tests/unit/datepicker/datepicker_events.js b/tests/unit/datepicker/datepicker_events.js
index 84ca2f98e..bf48c9c8a 100644
--- a/tests/unit/datepicker/datepicker_events.js
+++ b/tests/unit/datepicker/datepicker_events.js
@@ -112,6 +112,11 @@ test('events', function() {
inp.val('02/04/2008').datepicker('show').
simulate('keydown', {ctrlKey: true, keyCode: $.simulate.VK_END});
equals(selectedDate, '', 'Callback close date - ctrl+end');
+
+ var inp2 = init('#inp2');
+ inp2.datepicker().datepicker('option', {onClose: callback}).datepicker('show');
+ inp.datepicker('show');
+ equals(selectedThis, inp2[0], 'Callback close this');
});
})(jQuery);