Skip to content
Permalink
Browse files

Datepicker: enabled OSX meta keys to work when constraining input. Fi…

…xed #5317 - datepicker cmd+a/c/v is not working on MAC OS-X
  • Loading branch information
dblood authored and scottgonzalez committed Dec 2, 2010
1 parent b9e34f7 commit 51695f82c8c0017d3853b36bdadec5c8253648fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.datepicker.js
@@ -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);
}
},

0 comments on commit 51695f8

Please sign in to comment.
You can’t perform that action at this time.