From ee7047e20459cea54c02e01c1545e13df414af6f Mon Sep 17 00:00:00 2001 From: Valeriy Date: Thu, 23 Oct 2014 17:25:50 +0600 Subject: [PATCH] Fix behavior under iPad and iPhone --- index.html | 3 ++- jquery.datetimepicker.js | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 3972753..e732c3d 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,8 @@ $('#default_datetimepicker').datetimepicker({ formatTime:'H:i', formatDate:'d.m.Y', defaultDate:'8.12.1986', // it's my birthday - defaultTime:'10:00' + defaultTime:'10:00', + timepickerScrollbar:false }); $('#datetimepicker10').datetimepicker({ diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index ab9d96e..d3ab588 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -348,7 +348,10 @@ touchStart = false, startTopScroll = 0, calcOffset = function () {}; - + if (percent === 'hide') { + timeboxparent.find('.xdsoft_scrollbar').hide(); + return; + } if (!$(this).hasClass('xdsoft_scroller_box')) { timebox = timeboxparent.children().eq(0); parentHeight = timeboxparent[0].clientHeight; @@ -532,8 +535,8 @@ timepicker = $('
'), timeboxparent = timepicker.find('.xdsoft_time_box').eq(0), timebox = $('
'), - scrollbar = $('
'), - scroller = $('
'), + /*scrollbar = $('
'), + scroller = $('
'),*/ monthselect = $('
'), yearselect = $('
'), triggerAfterOpen = false, @@ -661,7 +664,7 @@ } if (!options.timepickerScrollbar) { - scrollbar.hide(); + timeboxparent.xdsoftScroller('hide'); } if (options.minDate && /^-(.*)$/.test(options.minDate)) {