Fullcalendar从3.x迁移到4.x extraParams不会将多个输入作为数组进行操作

时间:2019-07-11 10:44:18

标签: javascript ajax fullcalendar fullcalendar-4

我正在尝试从全日历3.x迁移到4.x

template <int lrrysz>
__global__ void thekernel(float *in, float *out)
{

    float local[lrrysz];

    // your code goes here

}

template __global__ void thekernel<5>(float*, float*);
template __global__ void thekernel<6>(float*, float*);
template __global__ void thekernel<7>(float*, float*);
template __global__ void thekernel<8>(float*, float*);
template __global__ void thekernel<9>(float*, float*);
template __global__ void thekernel<10>(float*, float*);

在3.x版本中,<select id="ids" name="ids[]" class="form-control" multiple> <option value="1" selected> Option 1</option> <option value="2"> Option 2</option> <option value="3"> Option 3</option> </select> <button type="button" id="btn-filter">Apply</button> 中的data参数被正确地管理为数组:

这是我的FIREFOX控制台:

events

代码段:

array_ids[]:
    0: 1
    1: 2
start:  2019-06-01T00:00:00
end:    2019-07-01T00:00:00

现在,使用以下代码转换为4.x后:

  events: {
        url: './get-events.php',
        cache: false,
        type: 'POST',
        data: function() { // a function that returns an object
          return {
            array_ids: $("#ids").val()
           };
        }
        error: function () {
            alert('there was an error while fetching events!');
        },
    },

我的FIREFOX CONSOLE节目:

         events: {
            url: './get-events.php',
            cache: false,
            method: 'POST',      <--- type -> method
            extraParams: function() { 
              return {
                array_ids: $("#ids").val()
              };
            }
        },

请参阅附件(在此示例中将array_ids重命名,但逻辑相同) enter image description here

0 个答案:

没有答案