gpt4 book ai didi

php - jquery完整日历在ipad safari浏览器上不显示事件

转载 作者:行者123 更新时间:2023-12-01 05:54:00 27 4
gpt4 key购买 nike

我正在研究jQuery full calendar它在 Windows/Linux 上显示事件,如果我在 iPad(Safari 浏览器)上进行测试,日历不会显示事件。如果我点击任何日期,事件点击功能正常工作,但根本不显示事件。

这是我的代码:

var SITE_URL = 'MY_SITE_URL';

$(document).ready(function () {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var calendar = $('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek'
},
editable: true,
draggable: true,
dayClick: function (date, allDay, jsEvent, view) {
var myDate = new Date();

if (date.getDate() < myDate.getDate()) {
//TRUE Clicked date smaller than today
alert("You cannot book on this day!");
} else {
//dynamically load soloads which are not assigned to any date
var mmon = parseInt(date.getMonth() + 1);
var clicked_date = date.getDate() + '_' + mmon + '_' + date.getFullYear();
$('#get_selected_date').val(clicked_date);
$.ajax({
url: SITE_URL + 'member/getUserUnassignedAds',
type: 'POST',
success: function (data) {
$('#soloadsdropdown').html(data);
$('#addsoloadformlink').trigger('click');
}
});
}
},
events: function (start, end, callback) {
// on calendar loads this ajax runs
$.ajax({
url: SITE_URL + 'member/getUserAllAssignedAds',
success: function (doc) {
var doc = $.parseJSON(doc);

var events = [];
$(doc).each(function (i, val) {
events.push({
id: doc[i].id,
title: doc[i].title,
start: new Date(doc[i].start),
color: doc[i].color
});
});
callback(events);
}
});
},
eventDrop: function (event, dayDelta, minuteDelta, allDay, revertFunc) {
var dataString = 'assign_id=' + event.id;
$.ajax({
url: SITE_URL + 'member/checkIfAdIsOrdered',
type: 'POST',
data: dataString,
success: function (data) {
if (data != '0') {
if (data == 'mybought') {
alert("You cannot schedule bought ads!");
} else {
alert("You cannot rearrange sold ads!");
}
revertFunc();
} else {
if (!confirm("Do you really want to reschedule " + event.title + "?")) {
revertFunc();
} else {
var dataString = 'move_days=' + dayDelta + '&assign_id=' + event.id;
$.ajax({
url: SITE_URL + 'member/updateUserActiveAssignedAds',
type: 'POST',
data: dataString,
success: function (data) {
if (data == 'pastdate') {
alert("You cannot edit past date events!");
revertFunc();
} else if (data == 'notdone') {
alert("You cannot book on this day!");
revertFunc();
}
}
});
}
}
}
});
},
eventClick: function (event) {
var dataString = 'assign_id=' + event.id;
$.ajax({
url: SITE_URL + 'member/checkIfAdIsOrdered',
type: 'POST',
data: dataString,
success: function (data) {
if (data == 'pastdate') {
alert("You cannot edit past date events!");
} else if (data == 'reservedad') {
$('#clickreservebox').trigger('click');
$('#reservebox').show();
$('#unreservethisad').attr('rel', event.id);
} else {
if (data != '0' || data == 'mybought') {
$('#myOrderModal').html(data);
$('#clickorderconfirmbox').trigger('click');
$('#redirectbox').show();
} else {
$('#clickconfirmbox').trigger('click');
$('#confirmbox').show();
$('.pp-reserve-btn').attr('rel', event.id);
$('.pp-close-ii').attr('rel', event.id);
}
}
}
});
}
});
});

//At the end to make it real time i have added
$(document).ready(function(){
setInterval(function(){
$('#calendar').fullCalendar('refetchEvents');
}, 1000);
});

最佳答案

通过说它没有填充,您的意思是没有加载任何事件,对吧?有类似的问题,这是因为到后端的路径在 MAC 而不是 Windows 上是区分大小写的。因此,请再次检查您的 SITE_URL 变量是否正确。

在 Mac 上,您还可以使用 Safari 来检查设备上可能存在的错误。 Take a look here获取教程

关于php - jquery完整日历在ipad safari浏览器上不显示事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18029939/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com