Allow to input characters of localized AM/PM markers.

This commit is contained in:
Jun Omae 2011-08-12 22:07:10 +09:00
parent 9ee65b2428
commit 195be63853

View file

@ -976,6 +976,8 @@ $.datepicker._doKeyPress = function(event) {
tp_inst._defaults.separator +
tp_inst._defaults.timeSuffix +
(tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') +
(tp_inst._defaults.amNames.join('')) +
(tp_inst._defaults.pmNames.join('')) +
dateChars,
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);