Showing only ONE week (Opening hours, each week the same)

*爱你&永不变心* 提交于 2019-12-10 11:28:48

问题


I would like to know if it is possible to show only one week, to use this calendar for showing opening hours of a shop.
So :
- I don't want to show the day dates (only the day names) : OK
- I don't want to colorize the current day : OK
- I want the calendar display always the same week => I don't know how to do that...

Have you got any idea ? Is it possible to do that ?

Thanks a lot !


回答1:


If you use the "goToDate" method:

gotoDate

Moves the calendar to an arbitrary year/month/date.

.fullCalendar( 'gotoDate', year [, month, [ date ]] )

IMPORTANT: month is 0-based, meaning January=0, February=1, etc.

you could add your shop opening hours on the calendar for a given date, and then just show the date. However, you could also just add them for the current week being shown - this would then allow you to change times, for example, bank holidays etc. Have an array of special dates and print normally if not one of those dates...




回答2:


Since version 1.3 and 1.4 fullcalendar is now able to show week view:

http://arshaw.com/fullcalendar/docs/views/

http://arshaw.com/fullcalendar/docs/views/Available_Views/

Example:

http://arshaw.com/fullcalendar/views/agendaWeek/



来源:https://stackoverflow.com/questions/4733061/showing-only-one-week-opening-hours-each-week-the-same

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!