diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index 9172e63..2952b59 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -1487,6 +1487,9 @@ } event.stopPropagation(); }) + .on('toggle.xdsoft', function (event) { + datetimepicker.is(':visible') ? datetimepicker.trigger('close.xdsoft') : datetimepicker.trigger('open.xdsoft'); + }) .data('input', input); timer = 0; @@ -1598,6 +1601,9 @@ case 'hide': datetimepicker.trigger('close.xdsoft'); break; + case 'toggle': + datetimepicker.trigger('toggle.xdsoft'); + break; case 'destroy': destroyDateTimePicker($(this)); break;