From 579eea65cea621da335de6001884f8834316bd2f Mon Sep 17 00:00:00 2001 From: Eugeniy Date: Wed, 4 Jun 2014 10:53:58 +0400 Subject: [PATCH] Added closeOnInputClick options Added options for ability to close datepicker window when datepicker-initialize input has been click --- jquery.datetimepicker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index cf7b924..13c0f5b 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -189,6 +189,7 @@ monthChangeSpinner:true, closeOnDateSelect:false, closeOnWithoutClick:true, + closeOnInputClick: true, timepicker:true, datepicker:true, @@ -1240,7 +1241,7 @@ input .data( 'xdsoft_datetimepicker',datetimepicker ) .on('open.xdsoft focusin.xdsoft mousedown.xdsoft',function(event) { - if( input.is(':disabled')||input.is(':hidden')||!input.is(':visible') ) + if( input.is(':disabled')||input.is(':hidden')||!input.is(':visible')||(input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick) ) return; clearTimeout(timer); timer = setTimeout(function() {