diff --git a/src/EventManager.js b/src/EventManager.js index 4d159ab..81ffb8d 100644 --- a/src/EventManager.js +++ b/src/EventManager.js @@ -130,10 +130,10 @@ function EventManager(options, _sources) { var startParam = firstDefined(source.startParam, options.startParam); var endParam = firstDefined(source.endParam, options.endParam); if (startParam) { - data[startParam] = Math.round(+rangeStart / 1000); + data[startParam] = (options.startEndDateOnly) ? (rangeStart.getYear()+'-'+(rangeStart.getMonth()+1)+'-'+rangeStart.getDate()) : Math.round(+rangeStart / 1000); } if (endParam) { - data[endParam] = Math.round(+rangeEnd / 1000); + data[endParam] = (options.startEndDateOnly) ? (rangeEnd.getYear()+'-'+(rangeEnd.getMonth()+1)+'-'+rangeEnd.getDate()) : Math.round(+rangeEnd / 1000); } pushLoading(); $.ajax($.extend({}, ajaxDefaults, source, { diff --git a/src/defaults.js b/src/defaults.js index 9cb9982..7c44f00 100644 --- a/src/defaults.js +++ b/src/defaults.js @@ -19,10 +19,12 @@ var defaults = { allDayDefault: true, ignoreTimezone: true, + // event ajax lazyFetching: true, startParam: 'start', endParam: 'end', + startEndDateOnly: false, // time formats titleFormat: {