I have a need to use the FullCalendar plugin's month view, but with a small twist... I need the month view to be a calendar month (4 weeks) from the currently selected date, not a month proper (Jan, Feb, etc). In other words, I need the top left column to be the currently selected date, with the calendar rendering 4 weeks after that in month view.
Something similar to what is provided by thefirstDay property in agendaWeek view is close to what I am after. firstDay only sets the day of the week though, not a specific date within the month as the first day.
Try
firstDay: new Date().getDay()
in the parameters.
If you're going to show a Thursday in the upper left hand corner then what you've got isn't a calendar. It's a table data.
FullCalendar's firstDay is just for switching between starting on a Monday (European style) and starting on a Sunday (US style).
Related
I have setup fullcalendar to display weeknumbers as per the docs: https://fullcalendar.io/docs/v3/weekNumbers#v2
I would like to get the weeknumber from fullcalendar, so I can use it in my code, because I need to display it outside of fullcalendar.
I know I can do my own calculation of week number, but I would like to get the one from fullcalendar, so I am sure, that the week number displayed in fullcalendar is always the same as the week number I display elsewhere.
The moment-objects seems to have a function called week(), which will return the week of the year for the moment-object: https://momentjs.com/docs/#/get-set/week/
This gets the weeknumber for the first week in a view. If the view is 'agendaWeek', then it will show the week number for the displayed week. If the view is 'month' it will get the week number for the first displayed week of the month
viewRender: function(view, element)
{
alert(view.intervalStart.week());
}
I am using the calendar in list mode and a question has arisen. Can I select a specific day?
In the list mode I have a full month loaded, but when I enter for the first time I would like to select a specific day, by default, the day we are on.
Thanks for the comments, but what I need is to show all the information, and be positioned on a specific day, not always on the first day that has information, usually on day 1 of the selected month
It's possible?
Day view
list view
I used the method ".fullCalendar ('gotoDate', moment (" 30/10/2018 "," DD / MM / YYYY "))". In the rest of the views it works correctly but in the list mode the information of that day is not shown but it continues to appear on the day 01/10/2018.
Thank you
I am using fullcalendar.io and I realized that if I create a new event in the month view, dragging across one or more days, it returns a timestamp for the end date which is later rendered as 12 am of the day after while it should be logic that a function date("what-ever-format", timestamp) returns 12 pm of the current day, or, in any case, not the following day.
Any idea how to fix this???
I am really stucked at this.what i want is that there should be 6 table cells in which i should have days with date. like
Monday 4/3/2013 Tuesday 5/3/2013 and so on till saturday
.i have two more buttons,previous week and next week button.. it should automatically show next week when i click the next week button and should show the previous week whenever i press the previous button..
also the i need to take the value of days/month and year so that i can use them in where clause in my sql query..pls its urgent can anyone help me with this...
im providing a link you can see what exactly i want by visiting this link
www.test.ginormous.in/dinesmart/Filestore/Food/Capture.png
i am just giving you the outline as posting the whole code is not possible.
create an asp:panel in your aspx page
try generating the table structure dynamically inside that panel by writing myPanel.innerhtml = "(your html structure generated in a string)"
use theDate.AddDays(7 - (int)theDate.DayOfWeek) to get the date for this weeks sunday.(where theDay is the current date or the date given by you and change 7 to 6 if you want it for monday as this returns date for sunday etc..)
on previous and next click you can add or subtract 7 days from the first day of the weel that is generated above.
hope this helps you.
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 !
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...
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/