mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
build
This commit is contained in:
parent
cf89d330df
commit
3579a82d11
@ -942,7 +942,8 @@ var datetimepickerFactory = function ($) {
|
||||
KEY9 = 57,
|
||||
_KEY0 = 96,
|
||||
_KEY9 = 105,
|
||||
CTRLKEY = 17,
|
||||
CTRLKEY = 17,
|
||||
CMDKEY = 91,
|
||||
DEL = 46,
|
||||
ENTER = 13,
|
||||
ESC = 27,
|
||||
@ -958,7 +959,8 @@ var datetimepickerFactory = function ($) {
|
||||
VKEY = 86,
|
||||
ZKEY = 90,
|
||||
YKEY = 89,
|
||||
ctrlDown = false,
|
||||
ctrlDown = false,
|
||||
cmdDown = false,
|
||||
options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
|
||||
|
||||
lazyInitTimer = 0,
|
||||
@ -2453,8 +2455,12 @@ var datetimepickerFactory = function ($) {
|
||||
// hitting backspace in a selection, you can possibly go back any further - go forward
|
||||
pos += (key === BACKSPACE && !hasSel) ? -1 : 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (event.metaKey) { // cmd has been pressed
|
||||
pos = 0;
|
||||
hasSel = true;
|
||||
}
|
||||
|
||||
if (hasSel) {
|
||||
// pos might have moved so re-calc length
|
||||
@ -2576,16 +2582,27 @@ var datetimepickerFactory = function ($) {
|
||||
}
|
||||
};
|
||||
$(options.ownerDocument)
|
||||
.off('keydown.xdsoftctrl keyup.xdsoftctrl')
|
||||
.off('keydown.xdsoftctrl keyup.xdsoftctrl')
|
||||
.off('keydown.xdsoftcmd keyup.xdsoftcmd')
|
||||
.on('keydown.xdsoftctrl', function (e) {
|
||||
if (e.keyCode === CTRLKEY) {
|
||||
ctrlDown = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
.on('keyup.xdsoftctrl', function (e) {
|
||||
if (e.keyCode === CTRLKEY) {
|
||||
ctrlDown = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
.on('keydown.xdsoftcmd', function (e) {
|
||||
if (e.keyCode === CMDKEY) {
|
||||
cmdDown = true;
|
||||
}
|
||||
})
|
||||
.on('keyup.xdsoftcmd', function (e) {
|
||||
if (e.keyCode === CMDKEY) {
|
||||
cmdDown = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.each(function () {
|
||||
|
2
build/jquery.datetimepicker.full.min.js
vendored
2
build/jquery.datetimepicker.full.min.js
vendored
File diff suppressed because one or more lines are too long
2
build/jquery.datetimepicker.min.js
vendored
2
build/jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user