Semantic-UI-Calendar icon indicating copy to clipboard operation
Semantic-UI-Calendar copied to clipboard

Increment hard coded to 5 minutes

Open seeker25 opened this issue 7 years ago • 5 comments

Looking at this line:

increment *= mode === 'minute' ? 5 : 1;

as well:

                var cellDate = isYear ? new Date(i, month, 1, hour, minute) :
                  isMonth ? new Date(year, i, 1, hour, minute) : isDay ? new Date(year, month, i, hour, minute) :
                    isHour ? new Date(year, month, day, i) : new Date(year, month, day, hour, i * 5);

Is there a way to set this as a variable? Say 15 minutes instead?

Goes a bit further than this as well. You'd have to recalculate number of the rows and columns.

So depending on the interval set, would need to compute the number of rows and columns needed.

seeker25 avatar Jan 31 '18 20:01 seeker25

I would really like this feature as well! Any updates?

Tsourdox avatar Apr 16 '18 19:04 Tsourdox

Me too kplztx

Healyhatman avatar Apr 19 '18 13:04 Healyhatman

+1

kemikal avatar May 11 '18 09:05 kemikal

Looking at this line:

increment *= mode === 'minute' ? 5 : 1;

as well:

                var cellDate = isYear ? new Date(i, month, 1, hour, minute) :
                  isMonth ? new Date(year, i, 1, hour, minute) : isDay ? new Date(year, month, i, hour, minute) :
                    isHour ? new Date(year, month, day, i) : new Date(year, month, day, hour, i * 5);

Is there a way to set this as a variable? Say 15 minutes instead?

Goes a bit further than this as well. You'd have to recalculate number of the rows and columns.

So depending on the interval set, would need to compute the number of rows and columns needed.

here is its vrariable https://github.com/domialex/Semantic-UI-Calendar minuteStep: 5, // how many minutes to separate an hour, can be 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30.

crewow avatar Jan 10 '19 06:01 crewow

As the calendar has been merged into Fomantic-UI we added the option minTimeGap by https://github.com/fomantic/Fomantic-UI/pull/198/ and made this feature happen :slightly_smiling_face: https://fomantic-ui.com/modules/calendar.html#/settings

lubber-de avatar Jan 22 '19 14:01 lubber-de