jquery-src/jquery.calendars.picker.js
function(event) {
			var elem = (event.data && event.data.elem) || event.target;
			var inst = plugin._getInst(elem);
			var handled = false;
			if (inst.inline || inst.div) {
				if (event.keyCode === 9) { // Tab - close
					plugin.hide(elem);
				}
				else if (event.keyCode === 13) { // Enter - select
					plugin.selectDate(elem,
						$('a.' + inst.options.renderer.highlightedClass, inst.div)[0]);
					handled = true;
				}
				else { // Command keystrokes
					var commands = inst.options.commands;
					for (var name in commands) {
						var command = commands[name];
						if (command.keystroke.keyCode === event.keyCode &&
								!!command.keystroke.ctrlKey === !!(event.ctrlKey || event.metaKey) &&
								!!command.keystroke.altKey === event.altKey &&
								!!command.keystroke.shiftKey === event.shiftKey) {
							plugin.performAction(elem, name);
							handled = true;
							break;
						}
					}
				}
			}
			else { // Show on 'current' keystroke
				var command = inst.options.commands.current;
				if (command.keystroke.keyCode === event.keyCode &&
						!!command.keystroke.ctrlKey === !!(event.ctrlKey || event.metaKey) &&
						!!command.keystroke.altKey === event.altKey &&
						!!command.keystroke.shiftKey === event.shiftKey) {
					plugin.show(elem);
					handled = true;
				}
			}
			inst.ctrlKey = ((event.keyCode < 48 && event.keyCode !== 32) || event.ctrlKey || event.metaKey);
			if (handled) {
				event.preventDefault();
				event.stopPropagation();
			}
			return !handled;
		}
function(event) {
			var elem = (event.data && event.data.elem) || event.target;
			var inst = plugin._getInst(elem);
			var handled = false;
			if (inst.inline || inst.div) {
				if (event.keyCode === 9) { // Tab - close
					plugin.hide(elem);
				}
				else if (event.keyCode === 13) { // Enter - select
					plugin.selectDate(elem,
						$('a.' + inst.options.renderer.highlightedClass, inst.div)[0]);
					handled = true;
				}
				else { // Command keystrokes
					var commands = inst.options.commands;
					for (var name in commands) {
						var command = commands[name];
						if (command.keystroke.keyCode === event.keyCode &&
								!!command.keystroke.ctrlKey === !!(event.ctrlKey || event.metaKey) &&
								!!command.keystroke.altKey === event.altKey &&
								!!command.keystroke.shiftKey === event.shiftKey) {
							plugin.performAction(elem, name);
							handled = true;
							break;
						}
					}
				}
			}
			else { // Show on 'current' keystroke
				var command = inst.options.commands.current;
				if (command.keystroke.keyCode === event.keyCode &&
						!!command.keystroke.ctrlKey === !!(event.ctrlKey || event.metaKey) &&
						!!command.keystroke.altKey === event.altKey &&
						!!command.keystroke.shiftKey === event.shiftKey) {
					plugin.show(elem);
					handled = true;
				}
			}
			inst.ctrlKey = ((event.keyCode < 48 && event.keyCode !== 32) || event.ctrlKey || event.metaKey);
			if (handled) {
				event.preventDefault();
				event.stopPropagation();
			}
			return !handled;
		}
function ( event ) { var elem = ( event . data && event . data . elem ) || event . target ; var inst = plugin . _getInst ( elem ) ; var handled = false ; if ( inst . inline || inst . div ) { if ( event . keyCode === 9 ) { // Tab - close plugin . hide ( elem ) ; } else if ( event . keyCode === 13 ) { // Enter - select plugin . selectDate ( elem , $ ( 'a.' + inst . options . renderer . highlightedClass , inst . div ) [ 0 ] ) ; handled = true ; } else { // Command keystrokes var commands = inst . options . commands ; for ( var name in commands ) { var command = commands [ name ] ; if ( command . keystroke . keyCode === event . keyCode && ! ! command . keystroke . ctrlKey === ! ! ( event . ctrlKey || event . metaKey ) && ! ! command . keystroke . altKey === event . altKey && ! ! command . keystroke . shiftKey === event . shiftKey ) { plugin . performAction ( elem , name ) ; handled = true ; break ; } } } } else { // Show on 'current' keystroke var command = inst . options . commands . current ; if ( command . keystroke . keyCode === event . keyCode && ! ! command . keystroke . ctrlKey === ! ! ( event . ctrlKey || event . metaKey ) && ! ! command . keystroke . altKey === event . altKey && ! ! command . keystroke . shiftKey === event . shiftKey ) { plugin . show ( elem ) ; handled = true ; } } inst . ctrlKey = ( ( event . keyCode < 48 && event . keyCode !== 32 ) || event . ctrlKey || event . metaKey ) ; if ( handled ) { event . preventDefault ( ) ; event . stopPropagation ( ) ; } return ! handled ; }
Handle keystrokes in the datepicker.
@memberof CalendarsPicker
@private
@param event {KeyEvent} The keystroke.
@return {boolean} <code>true</code> if not handled, <code>false</code> if handled.
Handle keystrokes in the datepicker .