Calendar update() method doesn't update the UI

Hi to all

I try to implement a Today functionality using a custom link in the date picker footer area.
But method update() doesn’t work properly when I’m in a different month. So the date changed to current date but the UI doesn’t turn to the current month/date on the screen

my Code:

				var dateFrom = app.calendar.create({
					inputEl: '#dateFrom',
					dateFormat: 'dd-mm-yyyy',
					header: true,
					footer: true,
					closeOnSelect: true,
					openIn: 'customModal',
					on: {
						open(calendar) {
						  calendar.$el.find('.calendar-footer').prepend(`<a class="link today-link" style="margin-right: auto">TODAY</a>`);
						  calendar.$el.find('.today-link').off('click').on('click', function () {
								var todayval= [];
								todayval[0] = new Date();


Is that a bug or do I have to change something?


Screenshot 2022-11-24 210018

let date = new Date();
calendar.setYearMonth(date.getFullYear(), date.getMonth(), 300);
1 Like