Ask Your Question
0

What is the correct way to load the jQuery fullcalendar plugin in a div that is not visible?

asked 2021-07-28 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-07-15 20:00:00 +0000

david gravatar image

The correct way to load the jQuery FullCalendar plugin in a div that is not visible is to first load the plugin and then initialize the calendar in the hidden div with the necessary options. Here's an example:

  1. Load the FullCalendar plugin:
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.10.2/fullcalendar.min.js"></script>
  1. Initialize the calendar in the hidden div with the necessary options:
$("#calendar").fullCalendar({
  // options here
});

Note that for the calendar to function properly, it may be necessary to set the width and height of the hidden div to a specific value, even if it is not visible. This can be done with CSS:

#calendar {
  display: none;
  width: 700px;
  height: 500px;
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-07-28 11:00:00 +0000

Seen: 13 times

Last updated: Jul 15 '22