Issue 2283: slotDuration/snapDuration should accept view option hash
Status:  Released
Owner: ----
Closed:  Dec 2014
Reported by j_schum...@gmx.de, Sep 10, 2014
Expected result / use case:

Having the possibility to set slotDuration = '00:30:00' for agendaWeek and slotDuration = '00:05:00' for agendaDay. When selecting times or dragging events within week views it is not useful to have a high granularity like 5min. But when switching to day views it is good to allow the user to have fine control.

Current state:

Events not matching the slotDurations already render fine in all views.
But the view option hash only supports dragOpacity, titleFormat, columnFormat and timeFormat as stated in http://fullcalendar.io/docs/views/View_Option_Hash/
There is no preViewRender event that we could hook in to implement this in a clean way outside FC.

Requested feature:

Having slotDuration (and the corresponding snapDuration) available for setting in the view option hash. Probably the other agenda options would also make sense there.

Thanks in advance,
J.Schumann
Sep 11, 2014
Project Member #1 adamrs...@gmail.com
Even though the documentation states it is only available for those 3 options, I am almost positive that the code allows it for almost every option. I simply have not kept the docs up to date. Could you try using it with slotDuration and see what happens?
Sep 12, 2014
#2 sieglind...@gmail.com
Yes, 
using
slotDuration: {
    default: '00:15:00'
}
crashes the browser (tested: FF31, IE11). Also when default is in quotes, or in combination with a view:
slotDuration: {
    agendaDay: '00:05:00',
    'default': '00:15:00'
}

See Fiddle:
http://jsfiddle.net/fmeb9wus/1/

Maybe it's a bug (crash) instead of just unsupported.

Thanks for your fast reply!
Oct 2, 2014
#3 daniel.k...@freenet.de
Switching to daily/weekly-view (in the fiddle in #2) results in a crashing Firefox (32) and Chrome (37) for me as well. 
Oct 30, 2014
Project Member #4 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Reproducing
Labels: Type-Bug
Nov 25, 2014
Project Member #5 adamrs...@gmail.com
This is a current limit with View Option Hashes and durations. We want to be able to accept an object for a duration, because Moment durations can be objects, but it might get confused with the view-option-hash object type.

So currently, this is impossible. In the future, I want to improve the API to move away from View Option Hashes to something better.
Summary: slotDuration/snapDuration should accept view option hash (was: Add slotDuration/snapDuration to the view option hash)
Status: Accepted
Dec 29, 2014
Project Member #6 adamrs...@gmail.com
Version 2.2.4/2.2.5 has just been release with a solution to this problem. Please use the `views` option now:

http://fullcalendar.io/docs/views/View-Specific-Options/

So...

	$.fullCalendar({
		slotDuration: '00:15:00', // the default
		views: {
			agendaDay: {
				slotDuration: '00:05:00'
			}
		}
	});
Status: Released