Add ability to toggle datetimepicker

This commit is contained in:
Daniel Ma 2014-10-24 13:48:43 -07:00
parent f49674765a
commit 57f168baa0

View File

@ -1484,6 +1484,9 @@
} }
event.stopPropagation(); event.stopPropagation();
}) })
.on('toggle.xdsoft', function (event) {
datetimepicker.is(':visible') ? datetimepicker.trigger('close.xdsoft') : datetimepicker.trigger('open.xdsoft');
})
.data('input', input); .data('input', input);
timer = 0; timer = 0;
@ -1595,6 +1598,9 @@
case 'hide': case 'hide':
datetimepicker.trigger('close.xdsoft'); datetimepicker.trigger('close.xdsoft');
break; break;
case 'toggle':
datetimepicker.trigger('toggle.xdsoft');
break;
case 'destroy': case 'destroy':
destroyDateTimePicker($(this)); destroyDateTimePicker($(this));
break; break;