aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKeith Wood <kbwood.au@gmail.com>2009-04-16 10:42:04 +0000
committerKeith Wood <kbwood.au@gmail.com>2009-04-16 10:42:04 +0000
commit8f503d8d3158a6bca89d52cd460aadafafd234f5 (patch)
treeee0d5784a7893a3a3eaf8f1c5559fec16ad3acad /tests
parent62f11b4a2ee8a8c10c51d614e37af1f0216385db (diff)
downloadjquery-ui-8f503d8d3158a6bca89d52cd460aadafafd234f5.tar.gz
jquery-ui-8f503d8d3158a6bca89d52cd460aadafafd234f5.zip
Datepicker: Fixed #3861 Manually entered date does not update altField
Diffstat (limited to 'tests')
-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() {