Check if ampm is enabled when constraining input
This commit is contained in:
parent
95a6ef2f44
commit
425b957de0
4
jquery-ui-timepicker-addon.js
vendored
4
jquery-ui-timepicker-addon.js
vendored
|
@ -610,8 +610,8 @@ $.datepicker._doKeyPress = function(event) {
|
||||||
if ($.datepicker._get(inst, 'constrainInput')) {
|
if ($.datepicker._get(inst, 'constrainInput')) {
|
||||||
var datetimeChars = tp_inst._defaults.timeFormat.toString()
|
var datetimeChars = tp_inst._defaults.timeFormat.toString()
|
||||||
.replace(/[hms]/g, '')
|
.replace(/[hms]/g, '')
|
||||||
.replace(/TT|T/g, 'APM')
|
.replace(/TT|T/g, tp_inst._defaults.ampm ? 'APM' : '')
|
||||||
.replace(/tt|t/g, 'apm') +
|
.replace(/tt|t/g, tp_inst._defaults.ampm ? 'apm' : '') +
|
||||||
" " +
|
" " +
|
||||||
$.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
|
$.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
|
||||||
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
|
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
|
||||||
|
|
Loading…
Reference in a new issue