Datepicker在safari上消失了

时间:2017-09-08 09:35:56

标签: jquery html css

我正在使用jquery ui datepicker(范围),点击打开我的日期选择器,如果我向下滚动页面,日历就会消失。我只在带有移动设备的safari浏览器上发现了这个问题

有没有人遇到这个问题?

你能查一下我的代码吗?

function datePicker(){
    $( function() {
        var dateFormat = "mm/dd/yy",
            from = $( "#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( this ) );
                }),
            to = $( "#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( this ) );
            });

        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"/>

From : <input type="text" class="checkin">
To: <input type="text" class="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>

1 个答案:

答案 0 :(得分:0)

更改代码行
X509Certificate2

WEBSITE_LOAD_CERTIFICATES