javascript - Why datepicker dissapears when scrolling the page? -


on mobile safari browser after show datepicker (clicking) if scroll down page datepicker not appear anymore can issue ?

i'm looking way fix datepicker ui issue couldn't result week can issue please ?

the problem happens mobile safari browser

function datepicker(){                       var dateformat = "mm/dd/yy",              = $( "#checkin,.checkin" )                  .datepicker({                      numberofmonths: 2,                      firstday: 1,                      mindate: 0,                      beforeshow:function(){                          $(this).datepicker("widget").addclass("main-datepicker");                      }                  })                  .on( "change", function() {                      to.datepicker( "option", "mindate", getdate( ) );                  }),              = $( "#checkout,.checkout" ).datepicker({                  numberofmonths: 2,                  firstday: 1,                  mindate: 0,                  beforeshow:function(){                      $(this).datepicker("widget").addclass("main-datepicker");                  }              })              .on( "change", function() {                  from.datepicker( "option", "maxdate", getdate( ) );              });            function getdate( element ) {              var date;              try {                  date = $.datepicker.parsedate( dateformat, element.value );              } catch( error ) {                  date = null;              }                return date;          }       }    datepicker();
<link href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" rel="stylesheet"/>    <input type="text" id="checkin">  <input type="text" id="checkout">    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

live demo


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -