Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/409.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript iphone中未触发完整日历的jquery datepicker年/月更改_Javascript_Jquery_Datepicker_Fullcalendar - Fatal编程技术网

Javascript iphone中未触发完整日历的jquery datepicker年/月更改

Javascript iphone中未触发完整日历的jquery datepicker年/月更改,javascript,jquery,datepicker,fullcalendar,Javascript,Jquery,Datepicker,Fullcalendar,我使用jquery datepicker来触发fullcalendar的年/月变化,它只适用于所有浏览器、所有PC屏幕和所有android手机,但不适用于iPhone 我已经使用jquery datepicker触发了完整的日历年/月更改,下面是我的代码 $("#myhcalendar").datepicker({ changeMonth: true, changeYear: true, showOn: 'both',

我使用jquery datepicker来触发fullcalendar的年/月变化,它只适用于所有浏览器、所有PC屏幕和所有android手机,但不适用于iPhone

我已经使用jquery datepicker触发了完整的日历年/月更改,下面是我的代码

$("#myhcalendar").datepicker({
            changeMonth: true,
            changeYear: true,
            showOn: 'both',
            onChangeMonthYear: function(year, month, objDatePicker) {

                var monthnew=("0" + (month + 1)).slice(-2);
                console.log(monthnew+'-'+'10'+'-'+year);
                $('#calendar').fullCalendar('gotoDate',  monthnew-1+''+'-'+'10'+'-'+year);
                //on change of date remove event-container 
                $('.fc-content-skeleton>table tbody td').removeClass('fc-event-container');
            }
        })
myhcalendar是jquery日期选择器id,#calendar是fullcalendar的id。这在除iphone以外的所有设备上都能完美运行。有什么建议吗

更新:刚才我看到在$('#calendar').fullCalendar('gotoDate',monthnew-1++''+'-'+'10'+'-'+年)之前添加了alert();可以工作,但在该行之后添加警报在iphone中不起作用,gotodate肯定有问题
如果需要查看任何其他代码,请发表意见。谢谢。

能否尝试添加以下内容以防止选择

-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
使用(/)而不是连字符(-)

如下

 $('#calendar').fullCalendar('gotoDate',  monthnew-1+''+'/'+'10'+'/'+year);

看起来这个问题越来越普遍了。:)查看(本周)关于
.addClass()
-
.removeClass()
不,这不是我需要在css上面添加哪个类的问题?日期选择器输入,#myhcalendar必须是我认为的id。你试过我的答案了吗?monthnew的价值是什么?