【发布时间】:2020-08-02 19:26:43
【问题描述】:
我的问题是第二个日历,它与 first.Only 在 Firefox 上同时显示。 我在代码中添加了 JQuery datepicker 以使日历在 IOS 上工作,现在在 IOS 上还可以,但在 Firefox 上,我从 Jquery 和基本 HTML 日历中获得了 input type="date" 的日历。
我想像在其他浏览器上一样删除 Firefox 中的 HTML 日历,只保留 JQuery 日历。
感谢您的帮助。
这是我的代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="http://code.jquery.com/jquery-1.11.2.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js" type="text/javascript"></script>
<link type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" />
</head>
<body>
<input type="date" class="calendar-delivery">
<script type="text/javascript">
$(window).on('load', function () {
if ( $('.calendar-delivery')[0].type = 'date' )
{
$('.calendar-delivery').datepicker(
{
dateFormat: "dd-mm-yy",
minDate: -5,
maxDate: +5,
beforeShowDay: function(date) {
var day = date.getDay();
return [(day != 0), ''];
}
}
);
}
});
</script>
</body>
</html>
【问题讨论】:
标签: jquery jquery-ui jquery-ui-datepicker