I am using jquery datepicker to trigger year/month change for fullcalendar, it just works fine for all browsers, all PC screens and all android phones but its not working in iphones.
I have used jquery datepicker to trigger fullcalendar year/month change, here is my code
$("#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 is jquery datepicker id, and #calendar is id for fullcalendar. this works perfect in all devices except in iphone. Any suggestions?
update: just now I saw by adding alert() before $('#calendar').fullCalendar('gotoDate', monthnew-1+''+'-'+'10'+'-'+year); works but adding alert after this line does not working in iphone, there must be problem with gotodate Please comment if any other code is required to view. Thank you.
use (/) instead of hyphen (-)
as below
$('#calendar').fullCalendar('gotoDate', monthnew-1+''+'/'+'10'+'/'+year);