aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/datepicker')
-rw-r--r--tests/unit/datepicker/datepicker_methods.js5
-rw-r--r--tests/unit/datepicker/datepicker_tickets.js5
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/unit/datepicker/datepicker_methods.js b/tests/unit/datepicker/datepicker_methods.js
index 8d078f099..7ef977604 100644
--- a/tests/unit/datepicker/datepicker_methods.js
+++ b/tests/unit/datepicker/datepicker_methods.js
@@ -102,16 +102,19 @@ test('enableDisable', function() {
ok(inp.next('img').css('opacity') == 1, 'Enable/disable image - image now enabled');
inp.datepicker('destroy');
// Inline
- var inl = init('#inl');
+ var inl = init('#inl', {changeYear: true});
var dp = $('.ui-datepicker-inline', inl);
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - initially marked as enabled');
ok(!dp.children().is('.ui-state-disabled'), 'Enable/disable inline - not visually disabled initially');
+ ok(!dp.find('select').attr('disabled'), 'Enable/disable inline - form element enabled initially');
inl.datepicker('disable');
ok(inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as disabled');
ok(dp.children().is('.ui-state-disabled'), 'Enable/disable inline - visually disabled');
+ ok(dp.find('select').attr('disabled'), 'Enable/disable inline - form element disabled');
inl.datepicker('enable');
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as enabled');
ok(!dp.children().is('.ui-state-disabled'), 'Enable/disable inline - not visiually disabled');
+ ok(!dp.find('select').attr('disabled'), 'Enable/disable inline - form element enabled');
inl.datepicker('destroy');
});
diff --git a/tests/unit/datepicker/datepicker_tickets.js b/tests/unit/datepicker/datepicker_tickets.js
index 7e6dc5f00..2b9ce05de 100644
--- a/tests/unit/datepicker/datepicker_tickets.js
+++ b/tests/unit/datepicker/datepicker_tickets.js
@@ -24,4 +24,9 @@ test('beforeShowDay-getDate', function() {
inp.datepicker('hide');
});
+test('Ticket 6827: formatDate day of year calculation is wrong during day lights savings time', function(){
+ var time = $.datepicker.formatDate("oo", new Date("2010/03/30 12:00:00 CDT"));
+ equals(time, "089");
+});
+
})(jQuery);