Merge pull request #245 from Marshevskyy/applyButton

Added option closeOnTimeSelect
This commit is contained in:
Valeriy 2015-02-26 17:01:35 +05:00
commit b885910a1c

View File

@ -437,6 +437,7 @@
monthChangeSpinner: true, monthChangeSpinner: true,
closeOnDateSelect: false, closeOnDateSelect: false,
closeOnTimeSelect: false,
closeOnWithoutClick: true, closeOnWithoutClick: true,
closeOnInputClick: true, closeOnInputClick: true,
@ -1608,9 +1609,10 @@
datetimepicker.trigger('select.xdsoft', [currentTime]); datetimepicker.trigger('select.xdsoft', [currentTime]);
datetimepicker.data('input').val(_xdsoft_datetime.str()); datetimepicker.data('input').val(_xdsoft_datetime.str());
if (!options.inline) {
datetimepicker.trigger('close.xdsoft'); if (options.inline !== true && options.closeOnTimeSelect === true) {
} datetimepicker.trigger('close.xdsoft');
}
if (options.onSelectTime && $.isFunction(options.onSelectTime)) { if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);