From 383e3d23e4fe0f922b7e4e30b268e3db9b549496 Mon Sep 17 00:00:00 2001 From: Jerrett Date: Wed, 26 Oct 2011 17:16:29 -0700 Subject: [PATCH] option for date only for next/prev... --- src/EventManager.js | 4 ++-- src/defaults.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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: {