Added support for not opening on focus

This commit is contained in:
Alex Wijnholds 2018-01-19 15:01:33 +01:00
parent 74389996ea
commit 9484843502
3 changed files with 12 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -552,6 +552,7 @@ var datetimepickerFactory = function ($) {
closeOnTimeSelect: true, closeOnTimeSelect: true,
closeOnWithoutClick: true, closeOnWithoutClick: true,
closeOnInputClick: true, closeOnInputClick: true,
openOnFocus: true,
timepicker: true, timepicker: true,
datepicker: true, datepicker: true,
@ -2421,6 +2422,9 @@ var datetimepickerFactory = function ($) {
if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) { if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
return; return;
} }
if (!options.openOnFocus) {
return;
}
clearTimeout(timer); clearTimeout(timer);
timer = setTimeout(function () { timer = setTimeout(function () {
if (input.is(':disabled')) { if (input.is(':disabled')) {