aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker/datepicker_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/datepicker/datepicker_options.js')
-rw-r--r--tests/unit/datepicker/datepicker_options.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index 57c19d789..52841468d 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -452,6 +452,17 @@ test('altField', function() {
inp.simulate('keydown', {ctrlKey: true, keyCode: $.simulate.VK_END});
equals(inp.val(), '', 'Alt field - dp - ctrl+end');
equals(alt.val(), '', 'Alt field - alt - ctrl+end');
+ // Verify alt field is updated on keyup
+ alt.val('');
+ inp.val('06/04/2008').datepicker('show');
+ inp.simulate('keyup', {keyCode: $.simulate.VK_ENTER});
+ equals(inp.val(), '06/04/2008', 'Alt field - dp - manual entry');
+ equals(alt.val(), '2008-06-04', 'Alt field - manual entry');
+ // Verify alt field is not updated on keyup if date is invalid
+ inp.val('12/04/');
+ inp.simulate('keyup', {keyCode: $.simulate.VK_ENTER});
+ equals(inp.val(), '12/04/', 'Alt field - dp - manual entry incomplete');
+ equals(alt.val(), '2008-06-04', 'Alt field - manual entry - not updated');
});
test('daylightSaving', function() {