mdehoog / Semantic-UI-Calendar

Calendar module for Semantic UI
MIT License
805 stars 127 forks source link

Increment hard coded to 5 minutes #117

Open seeker25 opened 6 years ago

seeker25 commented 6 years ago

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.

Tsourdox commented 6 years ago

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

Healyhatman commented 6 years ago

Me too kplztx

kemikal commented 6 years ago

+1

crewow commented 5 years ago

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.

lubber-de commented 5 years ago

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