From fb10237c9881d808bc8b3a3c0b7edff08ebfa91f Mon Sep 17 00:00:00 2001 From: Valeriy Date: Thu, 7 Nov 2013 10:31:36 +0600 Subject: [PATCH] New version Update method open --- datetimepicker.jquery.json | 2 +- jquery.datetimepicker.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/datetimepicker.jquery.json b/datetimepicker.jquery.json index 2f4223c..a607f5c 100644 --- a/datetimepicker.jquery.json +++ b/datetimepicker.jquery.json @@ -11,7 +11,7 @@ "timepicker", "datetimepicker" ], - "version": "1.0.2", + "version": "1.0.4", "author": { "name": "Chupurnov Valeriy", "url": "http://xdsoft.net/contacts.html" diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index d9563af..6b026cc 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -1,5 +1,5 @@ /** - * @preserve jQuery DateTimePicker plugin v1.0.3 + * @preserve jQuery DateTimePicker plugin v1.0.4 * (c) 2013, Chupurnov Valeriy. */ (function( $ ){ @@ -356,6 +356,12 @@ left:offset.left, top:offset.top+datetimepicker.data('input')[0].offsetHeight, }).show(); + if( options.closeOnWithoutClick ){ + $(window).on('mousedown keydown',function(){ + datetimepicker.close(); + $(this).off('mousedown',arguments.callee); + }); + } datetimepicker.trigger('open.doksoft'); } }; @@ -382,12 +388,6 @@ return; _xdsoft_datetime.setCurrentTime((input&&input.val&&input.val())?input.val():new Date); datetimepicker.open(); - if( options.closeOnWithoutClick ){ - $(window).on('mousedown keydown',function(){ - datetimepicker.close(); - $(this).off('mousedown',arguments.callee); - }); - } },100); //event.stopPropagation(); });