From 44039d036f35c5b7216dac237504230171585518 Mon Sep 17 00:00:00 2001 From: Valeriy Date: Tue, 8 Jul 2014 19:30:24 +0600 Subject: [PATCH] fix bug in ie8 --- bower.json | 2 +- datetimepicker.jquery.json | 2 +- jquery.datetimepicker.js | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 3eb270e..9a96cb2 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name":"datetimepicker", - "version":"2.3.0", + "version":"2.3.1", "main": [ "jquery.datetimepicker.js", "jquery.datetimepicker.css" diff --git a/datetimepicker.jquery.json b/datetimepicker.jquery.json index ea7fd82..95ed0c2 100644 --- a/datetimepicker.jquery.json +++ b/datetimepicker.jquery.json @@ -1,6 +1,6 @@ { "name": "datetimepicker", - "version": "2.3.0", + "version": "2.3.1", "title": "jQuery Date and Time picker", "description": "jQuery plugin for date, time, or datetime manipulation in form", "keywords": [ diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index 4fcbe4b..85d4e0a 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -1,5 +1,5 @@ /** - * @preserve jQuery DateTimePicker plugin v2.3.0 + * @preserve jQuery DateTimePicker plugin v2.3.1 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ * (c) 2014, Chupurnov Valeriy. */ @@ -1088,6 +1088,12 @@ timerclick++; var $this = $(this), currentTime = _xdsoft_datetime.currentTime; + + if( currentTime===undefined||currentTime===null ){ + _xdsoft_datetime.currentTime = _xdsoft_datetime.now(); + currentTime = _xdsoft_datetime.currentTime; + } + if( $this.hasClass('xdsoft_disabled') ) return false; @@ -1120,6 +1126,12 @@ xdevent.stopPropagation(); // NAJ: Prevents closing of Pop-ups, Modals and Flyouts var $this = $(this), currentTime = _xdsoft_datetime.currentTime; + + if( currentTime===undefined||currentTime===null ){ + _xdsoft_datetime.currentTime = _xdsoft_datetime.now(); + currentTime = _xdsoft_datetime.currentTime; + } + if( $this.hasClass('xdsoft_disabled') ) return false; currentTime.setHours($this.data('hour'));