javascript - Jquery UI datepicker shows on bottom in mobile device -
please see page link: http://checkmyryde.com/rent.php
i have used jquery ui datepicker, working fine desktop view. if open page in mobile device, datepicker positioning @ bottom of page. might issue here? idea? thanks
$(document).ready(function() { $('.date-picker').datepicker({ mindate: 0,dateformat: 'yy-mm-dd' }); });
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <p>date: <input type="text" id="datepicker" class="date-picker"></p>
as jquery autodetect screen, no need modified in jquery-ui. still if need override there soluton availableon below link. click here view original issue
(function() { var orig = jquery.datepicker._showdatepicker; jquery.datepicker._showdatepicker = function(input){ orig.apply(this, arguments); $('#ui-datepicker-div').css('top', '100px'); } });
you might change top
value according requirement.
Comments
Post a Comment