Previosu / Next Labels


#1

Is it possible to have a previous/next label on the calendar?

Example of what I mean: https://ibb.co/nQshZqd


#2

Hi Seyi,

Thanks for your question and example!
You can achieve that by creating custom elements inside the calendar’s onMarkupReady event.

onMarkupReady: function (event, inst) {
    // or 'mbsc-cal-year' for year div
    var monthDiv = $(event.target).find('.mbsc-cal-month');
    monthDiv.before('<div class="my-text">prev</div>');
    monthDiv.after('<div class="my-text">next</div>');
}

You can also add custom styling for it if needed.

.my-text {
    margin: 10px -5px;
    color: #007bff;
}

#3

Thank you, works well.