fullcalender.formatdate not working

后端 未结 4 1699
长情又很酷
长情又很酷 2020-12-19 21:18

I am trying to integrate fullcalender to php mysql.I have used the following code.I want to format the date such it will come in format yyyy/mm/dd but when i use format stat

4条回答
  •  既然无缘
    2020-12-19 21:55

    As Tifa's answer suggests : if you don't need the time part, don't encode it :

    start = $.fullCalendar.formatDate(start, "yyyy-MM-dd");
    

    Another problem lies in the parameter string you pass to your ajax request :

    data: 'title='+ title+'&start='+ start +'&end='+ end  ,
    

    This string is not url encoded.

    The easiest way to correct this is to pass an object, and let jQuery handle the encoding :

    data: {'title': title, 'start': start, 'end': end } ,
    

提交回复
热议问题