File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -608,10 +608,13 @@ $.datepicker._doKeyPress = function(event) {
608
608
609
609
if ( tp_inst ) {
610
610
if ( $ . datepicker . _get ( inst , 'constrainInput' ) ) {
611
- var datetimeChars = tp_inst . _defaults . timeFormat . toString ( )
611
+ var ampm = tp_inst . _defaults . ampm ,
612
+ datetimeChars = tp_inst . _defaults . timeFormat . toString ( )
612
613
. replace ( / [ h m s ] / g, '' )
613
- . replace ( / T T | T / g, tp_inst . _defaults . ampm ? 'APM' : '' )
614
- . replace ( / t t | t / g, tp_inst . _defaults . ampm ? 'apm' : '' ) +
614
+ . replace ( / T T / g, ampm ? 'APM' : '' )
615
+ . replace ( / T / g, ampm ? 'AP' : '' )
616
+ . replace ( / t t / g, ampm ? 'apm' : '' )
617
+ . replace ( / t / g, ampm ? 'ap' : '' ) +
615
618
" " +
616
619
$ . datepicker . _possibleChars ( $ . datepicker . _get ( inst , 'dateFormat' ) ) ,
617
620
chr = String . fromCharCode ( event . charCode === undefined ? event . keyCode : event . charCode ) ;
You can’t perform that action at this time.
0 commit comments