jQuery Fullcalendar活动日期在3月之后默认为2018年8月20日

时间:2018-01-23 09:42:43

标签: json symfony fullcalendar

这是一个我还没有遇到的奇怪问题 - 我已经使用FullCalendar为客户在SYmfony CRM中创建了一个预订日历,但是从今年3月31日开始预订的任何活动默认为8月20日进行编辑。 / p>

日历使用JSON方法来检索数据,据我所知,代码很好。奇怪的是,日历本身会显示正确的日期,只需点击进行编辑即可。

以下是编辑时显示正确日期的JSON示例:

{"id":53,"desc":"SL SUE BECKMAN PRIVATE CAMP - 8:00am - 3:00pm Telephone:SL SUE BECKMAN ","bookingDate":{"date":"2018-03-25 00:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"endDate":{"date":"2018-03-25 00:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"startTime":{"date":"1970-01-01 08:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"endTime":{"date":"1970-01-01 15:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"course":1}

以下是默认为8月20日的示例:

{"id":77,"desc":"WESTON HARRIERS PC PRIVATE BOOKING - 8:00am - 6:00pm Telephone:WESTON HARRIERS","bookingDate":{"date":"2018-04-08 00:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"endDate":{"date":"2018-04-08 00:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"startTime":{"date":"1970-01-01 08:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"endTime":{"date":"1970-01-01 18:00:00.000000","timezone_type":3,"timezone":"Europe\/London"},"course":1}

以下是表单类型的片段,其中显示了在CRM中编辑预订的日期:

$builder->add('booking_date', DateTimeType::class,
    array(
        'label' => 'Start Date',
        'required' => true,
        'widget' => 'single_text',
        'label_attr' => array(
            'class' => 'control-label required'
        ),
        'attr' => array(
            'class' => 'form-control pickr required'
        )
    ));
$builder->add('end_date', DateTimeType::class,
    array(
        'label' => 'End Date',
        'required' => true,
        'widget' => 'single_text',
        'label_attr' => array(
            'class' => 'control-label required'
        ),
        'attr' => array(
            'class' => 'form-control pickr required'
        )
    ));

就像我说的,它在日历中显示正确的日期,数据库存储正确的日期,JSON似乎也保持正确的日期 - 但从3月底开始,它默认为8月20日。它似乎是一个非常随机的东西,但我希望有人可能会遇到它或之前类似的东西?

修改

此处的预订与事件中日历配置中的预订相同:

{ id: 'b_77', resourceId: '1', start: '2018-04-08 08:00:00', end: '2018-04-08 18:00:00', color: '#3eb67e', desc: 'WESTON HARRIERS PC PRIVATE BOOKING - 8:00am - 6:00pm Telephone:WESTON HARRIERS', url: '/calendar/edit-booking/77' }

它有正确的开始和结束日期。

0 个答案:

没有答案