Reputation: 8461
I added pickadate.js to my project and everything is working fine. expect for one strange thing. When the date modal pops up there is some scrollable space at the top. It's kinda hard to describe so hear is a picture:
As you can see there is some empty space at the top there. If I scroll down it fits perfect. So my question is: How can I ensure that the content of this div is scrolled down on page load. Here is what I've currently tried.
$( document ).ready(function() {
var $input = $('.start-datepicker').pickadate()
$input.scrollTop = $input.scrollHeight;
});
This doesn't help however. Any help would be great thanks!
Upvotes: 0
Views: 34
Reputation: 8921
Try:
var d = $('.start-datepicker');
d.scrollTop(d.prop("scrollHeight"));
Upvotes: 1