diff options
author | Keith Wood <kbwood.au@gmail.com> | 2010-01-29 08:09:03 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2010-01-29 08:09:03 +0000 |
commit | f214b708894ef2a1607050977f9698cf0d916d43 (patch) | |
tree | 29b10d07b00593cc0fd55deb1986aef738fd2eb0 /tests/unit | |
parent | b144b7644bc5796199930c8a4300dee57ee3566c (diff) | |
download | jquery-ui-f214b708894ef2a1607050977f9698cf0d916d43.tar.gz jquery-ui-f214b708894ef2a1607050977f9698cf0d916d43.zip |
Datepicker: Fixed conflict between beforeShowDay and getDate
http://forum.jquery.com/topic/several-breaking-changes-in-jquery-ui-1-8rc1
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/datepicker/datepicker_tickets.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/unit/datepicker/datepicker_tickets.js b/tests/unit/datepicker/datepicker_tickets.js index 38c5e89f3..cf9dcbc5e 100644 --- a/tests/unit/datepicker/datepicker_tickets.js +++ b/tests/unit/datepicker/datepicker_tickets.js @@ -3,6 +3,27 @@ */ (function($) { -module("datepicker: tickets"); +module("datepicker: tickets", { + teardown: function() { + stop(); + setTimeout(start, 13); + } +}); + +// http://forum.jquery.com/topic/several-breaking-changes-in-jquery-ui-1-8rc1 +test('beforeShowDay-getDate', function() { + var inp = init('#inp', {beforeShowDay: function(date) { inp.datepicker('getDate'); return [true, '']; }}); + var dp = $('#ui-datepicker-div'); + inp.val('01/01/2010').datepicker('show'); + equals($('div.ui-datepicker-title').text(), 'January 2010', 'Initial month'); + $('a.ui-datepicker-next', dp).click(); + $('a.ui-datepicker-next', dp).click(); + equals($('div.ui-datepicker-title').text(), 'March 2010', 'After next clicks'); + inp.datepicker('hide').datepicker('show'); + $('a.ui-datepicker-prev', dp).click(); + $('a.ui-datepicker-prev', dp).click(); + equals($('div.ui-datepicker-title').text(), 'November 2009', 'After prev clicks'); + inp.datepicker('hide'); +}); })(jQuery); |