Categories
JavaScript Answers

How to set full calendar to a specific start date when it’s initialized for the 1st time with JavaScript?

Spread the love

Sometimes, we want to set full calendar to a specific start date when it’s initialized for the 1st time with JavaScript.

In this article, we’ll look at how to set full calendar to a specific start date when it’s initialized for the 1st time with JavaScript.

How to set full calendar to a specific start date when it’s initialized for the 1st time with JavaScript?

To set full calendar to a specific start date when it’s initialized for the 1st time with JavaScript, we call fullcalendar with an object with the initial date.

For instance, we write

$("#calendar").fullCalendar({
  year: 2022,
  month: 4,
  date: 25,
});

to select the calendar element and then call fullCalendar with an object with the initial year, month, and date values.

Conclusion

To set full calendar to a specific start date when it’s initialized for the 1st time with JavaScript, we call fullcalendar with an object with the initial date.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *