From: dblood Date: Thu, 2 Dec 2010 22:23:41 +0000 (-0800) Subject: Datepicker: enabled OSX meta keys to work when constraining input. Fixed #5317 -... X-Git-Tag: 1.8.7~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=51695f82c8c0017d3853b36bdadec5c8253648fb;p=jquery-ui.git Datepicker: enabled OSX meta keys to work when constraining input. Fixed #5317 - datepicker cmd+a/c/v is not working on MAC OS-X --- diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 519b8a913..abcb37067 100644 --- a/ui/jquery.ui.datepicker.js +++ b/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); } },