Skip to content

Commit 51695f8

Browse files
dbloodscottgonzalez
authored andcommitted
Datepicker: enabled OSX meta keys to work when constraining input. Fixed #5317 - datepicker cmd+a/c/v is not working on MAC OS-X
1 parent b9e34f7 commit 51695f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ $.extend(Datepicker.prototype, {
565565
if ($.datepicker._get(inst, 'constrainInput')) {
566566
var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
567567
var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
568-
return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
568+
return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
569569
}
570570
},
571571

0 commit comments

Comments
 (0)