Export to GitHub

fullcalendar - issue #946

Customize frequency of times in agenda slot axis


Posted on May 7, 2011 by Massive Rabbit

Easy to reproduce, new code with no tweaks, If you set slotMinutes to certain times, 15, 30, 45, the main time shows but the increment doesnt and has a blank cell, i.e for 30 mins 6am [blank] 7am Wheras it should show 6am 6:30 7am

It does this for all failed time events as below, but setting to intervals that work show each and every time slot time,

slotMinutes: 5 WORKS slotMinutes: 10 WORKS slotMinutes: 15 FAILS slotMinutes: 20 WORKS slotMinutes: 25 WORKS slotMinutes: 30 FAILS slotMinutes: 35 WORKS slotMinutes: 40 WORKS slotMinutes: 45 FAILS slotMinutes: 50 WORKS slotMinutes: 55 WORKS slotMinutes: 60 WORKS

Comment #1

Posted on May 7, 2011 by Massive Rabbit

I think ive found where its doing it, and i fixed it by commenting a line out.

Basically within the function buildSkeleton() the that is created to show the time does the following:

"A: " + ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') + "" +

now where its got !minutes, that releates to:

d = zeroDate(); maxd = addMinutes(cloneDate(d), maxMinute); addMinutes(d, minMinute); slotCnt = 0; for (i=0; d < maxd; i++) { minutes = d.getMinutes();

and an output of minutes shows 0 45 30 15.

Commenting out: minutes = d.getMinutes(); fixes it/well makes it work.

So why is that section in place?

Comment #2

Posted on May 9, 2011 by Helpful Monkey

the existing behavior is that it will only show times on the hour marks (1pm, 2pm , 3pm, etc). i will see if more people want to override this behavior and provide a new setting if necessary

Comment #3

Posted on Jun 1, 2012 by Happy Cat

Comment deleted

Comment #4

Posted on Jun 1, 2012 by Happy Cat

yes i am also facing this issue.Could please look on it.

Comment #5

Posted on Jul 25, 2012 by Swift Ox

would like to see the "feature" implemented as well.

Comment #6

Posted on Mar 11, 2013 by Grumpy Rabbit

I also encountered this need.

Comment #7

Posted on Mar 12, 2013 by Quick Kangaroo

I'll vote for this too.

Comment #8

Posted on Mar 22, 2013 by Grumpy Camel

I need it too.

Comment #9

Posted on May 24, 2013 by Quick Cat

I need it too.

Comment #10

Posted on Aug 7, 2013 by Massive Camel

Same issue here.

Comment #11

Posted on Aug 14, 2013 by Helpful Monkey

(No comment was entered for this change.)

Comment #12

Posted on Aug 14, 2013 by Helpful Monkey

Issue 633 has been merged into this issue.

Comment #13

Posted on Aug 15, 2013 by Helpful Monkey

Issue 951 has been merged into this issue.

Comment #14

Posted on Aug 15, 2013 by Helpful Monkey

(No comment was entered for this change.)

Comment #15

Posted on Aug 15, 2013 by Helpful Monkey

(No comment was entered for this change.)

Comment #16

Posted on Aug 15, 2013 by Helpful Monkey

Issue 1196 has been merged into this issue.

Comment #17

Posted on Sep 7, 2013 by Quick Dog

I am voting for this issue as well, thank you!

Comment #18

Posted on Mar 9, 2014 by Happy Camel

Is this issue being considered yet? It would be really useful to have this setting working.

Comment #19

Posted on May 20, 2014 by Helpful Panda

I also vote for this issue. Please consider fixing it. This would be very helpful. Thank you.

Comment #20

Posted on May 20, 2014 by Helpful Panda

Comment deleted

Comment #21

Posted on May 20, 2014 by Helpful Panda

A fix for this issue will be quite easy. The problem is on the code below:

"" + ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') + ""

If you want to show only the hour marks (1pm, 2pm , 3pm, etc), change the code to:

"" + ((!minutes) ? formatDate(d, opt('axisFormat')) : ' ') + ""

If you want to always show the time:

"" + formatDate(d, opt('axisFormat')) + ""

imho, the best solution would be add a new configuration like alwaysShowTime:true and do something like:

"" + ((!minutes || alwaysShowTime) ? formatDate(d, opt('axisFormat')) : ' ') + ""

Regards,

Pedro Vaz

Comment #22

Posted on Jun 5, 2014 by Helpful Monkey

Here is a pull request with an implementation of an option to show the time on every slot on the axis, via @jdwisse: https://github.com/arshaw/fullcalendar/pull/145

Comment #23

Posted on Jun 5, 2014 by Helpful Monkey

Another implementation, via @boycsbaldwin: https://github.com/arshaw/fullcalendar/pull/107

Comment #24

Posted on Jun 5, 2014 by Helpful Monkey

Another implementation via @AlexKa: https://github.com/arshaw/fullcalendar/pull/102

NOTE: i have not tested any of these pull request, nor investigated their compatibility with v2, but they are still probably worth checking out.

Comment #25

Posted on Jul 8, 2014 by Happy Elephant

15 min slots would be very useful

Comment #26

Posted on Jul 17, 2014 by Massive Elephant

I dont understand yet how to show every 15 minutes in the agendaDay. What code do i have to modify?

Comment #27

Posted on Jul 20, 2014 by Helpful Panda

can we add an option "axisSlotFormat" option, so that we can change the format if we want to, something like

((!minutes) ? formatDate(d, opt('axisFormat')) : "" + formatDate(d, ':mm') + "") +

Comment #28

Posted on Sep 29, 2014 by Grumpy Kangaroo

In fullcalendar 2.1 I replace in the line 5798 ((!slotNormal || !minutes) ?

for this code ( ( (slotNormal || minutes) || (!slotNormal || !minutes) )?

now is visible all frequency of times

Comment #29

Posted on Oct 15, 2014 by Happy Cat

Hi develope...@gmail.com,does it wor for 2.1.1 version?Thanks

Comment #30

Posted on Oct 15, 2014 by Grumpy Kangaroo

Hi yongha...@gmail.com!.. yes, It is what I am using

Comment #31

Posted on Nov 1, 2014 by Grumpy Hippo

Hi, I am using version 2.1.1 and I had to manually make this change in order for the "normal" time intervals to appear.

Comment #32

Posted on Aug 23, 2015 by Helpful Monkey

a solution to this has been implemented in fullcalendar v2.4.0, and released

the setting... http://fullcalendar.io/docs/agenda/slotLabelInterval/

changelog for the release... https://github.com/fullcalendar/fullcalendar/releases/tag/v2.4.0

Status: Released

Labels:
Type-Feature