Datepicker: Fixed #4474 Pressing Return (keyCode 13) overwrites manually inserted input in DatePicker

This commit is contained in:
Keith Wood 2009-04-26 07:25:15 +00:00
parent 2d67c203bf
commit c4b86dcfbe

View File

@ -513,11 +513,9 @@ $.extend(Datepicker.prototype, {
}
},
/* Synchronise manual entry and alternate field. */
/* Synchronise manual entry and field/alternate field. */
_doKeyUp: function(event) {
var inst = $.datepicker._getInst(event.target);
if (!$.datepicker._get(inst, 'altField'))
return true;
try {
var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
(inst.input ? inst.input.val() : null),