Skip to content

Commit

Permalink
Datepicker: enabled OSX meta keys to work when constraining input. Fi…
Browse files Browse the repository at this point in the history
…xed #5317 - datepicker cmd+a/c/v is not working on MAC OS-X
  • Loading branch information
dblood authored and scottgonzalez committed Dec 3, 2010
1 parent b9e34f7 commit 51695f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.datepicker.js
Expand Up @@ -565,7 +565,7 @@ $.extend(Datepicker.prototype, {
if ($.datepicker._get(inst, 'constrainInput')) {
var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
}
},

Expand Down

0 comments on commit 51695f8

Please sign in to comment.