Open Zambros opened 14 years ago
to show my example see these page: http://www.magicbussrl.it/Planning/planning_conferme.php you can change day with listbox "giorni" and "applica filtro"
The problem is here if (typeof options.data == 'string') { if (options.loading) options.loading(true); var jsonOptions = {}; jsonOptions[options.startParam || 'start'] = Math.round(weekStartDate.getTime() / 1000); jsonOptions[options.endParam || 'end'] = Math.round(weekEndDate.getTime() / 1000); $.getJSON(options.data, jsonOptions, function(data) { self._renderEvents(data, $weekDayColumns); if (options.loading) options.loading(false); }); }
In details jsonOptions[options.endParam || 'end'] = Math.round(weekEndDate.getTime() / 1000);
So json endParam is always 7. Any suggestion? I think the true way is : jsonOptions[options.endParam || 'end'] = Math.round(weekStartDate.getTime() / 1000 + this.options.daysToShow-1 * 86400);
Ok I see the solution:
jsonOptions[options.endParam || 'end'] = Math.round((weekStartDate.getTime() / 1000)+((this.options.daysToShow)*86400));
I hope this is helpfull for other.
Hi everybody I use week-calendar with daysToShow = 11, start and end parameters are setting to filter every 7 days. I tested with 2 day and everytime start and end parameters filter for 7 days.
What's it wrong? Is a bug??