mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tests for inline disabled datepicker
This commit is contained in:
parent
72ea968893
commit
30be7d0953
@ -17,6 +17,7 @@
|
||||
<script type="text/javascript" src="datepicker.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
@import "../themes/flora/flora.datepicker.css";
|
||||
.xerror, .error { display: none }
|
||||
</style>
|
||||
</head>
|
||||
|
@ -480,6 +480,23 @@ test('enableDisable', function() {
|
||||
ok(!inp[0].disabled, 'Enable/disable image - field now enabled');
|
||||
ok(inp.next('img').css('opacity') == 1, 'Enable/disable image - image now enabled');
|
||||
inp.datepicker('destroy');
|
||||
// Inline
|
||||
var inl = init('#inl');
|
||||
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - initially marked as enabled');
|
||||
ok($('.ui-datepicker-disabled', inl).length == 0, 'Enable/disable inline - cover initially absent');
|
||||
inl.datepicker('disable');
|
||||
ok(inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as disabled');
|
||||
var disabled = $('.ui-datepicker-disabled', inl);
|
||||
var dp = $('.ui-datepicker-inline', inl);
|
||||
ok(disabled.length == 1, 'Enable/disable inline - cover now present');
|
||||
ok(disabled.offset().top == dp.offset().top && disabled.offset().left == dp.offset().left,
|
||||
'Enable/disable inline - cover positioning');
|
||||
ok(disabled.width() == dp.width() && disabled.height() == dp.height(),
|
||||
'Enable/disable inline - cover sizing');
|
||||
inl.datepicker('enable');
|
||||
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as enabled');
|
||||
ok($('.ui-datepicker-disabled', inl).length == 0, 'Enable/disable inline - cover now absent');
|
||||
inl.datepicker('destroy');
|
||||
});
|
||||
|
||||
test('keystrokes', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user