datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

Inline option disables scroll on load

Open purgeru opened this issue 12 years ago • 3 comments

datetimepicker

When the DOM loads the datepicker has disables scrolling option on the time selector. I first have to click the home button then the scroll bar appears.

I am using: http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js

and this options:

        $('#datetimepicker3').datetimepicker({
          format:'d.m.Y H:i',
          inline:true,
          lang:'en',
        });

That also happens with the demo I download

purgeru avatar Apr 16 '14 10:04 purgeru

same problem

fanix avatar Apr 21 '14 14:04 fanix

This seems to be a repeated thread, but I am also experiencing this problem using jquery 1.11.1

jsenosiain avatar Jun 30 '14 18:06 jsenosiain

Not sure what the problem is but have managed to stop it happening by simulating the pressing of the home button when the datetimepicker is created. In the js file look for:

if (options.inline) {
    datetimepicker.addClass('xdsoft_inline');
    input.after(datetimepicker).hide();
    datetimepicker.trigger('afterOpen.xdsoft');
}

I got it to work by changing it to:

if (options.inline) {
        datetimepicker.addClass('xdsoft_inline');
        input.after(datetimepicker).hide();
        _xdsoft_datetime.setCurrentTime(0);
       setTimeout(function(){datetimepicker.trigger('afterOpen.xdsoft');}, 100);
 }

The timeout is needed otherwise it does not seem to work.

mark-cameron avatar Aug 16 '14 09:08 mark-cameron