| Issue 2283: | slotDuration/snapDuration should accept view option hash | |
| 3 people starred this issue and may be notified of changes. | Back to list |
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
Sep 12, 2014
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
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
(No comment was entered for this change.)
Status:
Reproducing
Labels: Type-Bug
Nov 25, 2014
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
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
|
|
| ► Sign in to add a comment |