I have two calendars on my page that are implemented using the full jQuery calendar plugin.
I need to download calendars, such as the remaining calendars and the calendar for the upcoming month. As with November, the correct calendar should be December. What I could do by indicating the dates.
But I have two navigation arrows to navigate the calendar to the left and right of these calendars. How can I get dynamics in the next month and year and vice versa, i.e. The previous month and previous year are provided month and year.
I found a way to get the current current month and year using moment.js, which will handle a leap year and all ...
Below is the code to get the current date. I need to know how I can get a preview of the month and year, and the next month and year for navigation clicks.
the code:
var eNow = new Date(); var eMoment = moment(eNow); var leftEMonth = eMoment.format('MM')-1; var leftEYear = eMoment.format('YYYY');
source share