Calendario Selected date

3 replies·opened Feb 24, 2021
M
marinos13Feb 24, 2021

Hello!

I am trying to distinguish which date I have clicked on my calendar by applying a border on the date but I am not sure how to get the element.

For example, if I click the 10th of March 2021 the calendar should add a red border on the date (as shown in the 2nd picture).

Is there a way to do that?

S
SemiColonWebSTAFFFeb 24, 2021

Hello,

Unfortunately, this is currently not supported out of the box and will need some JS Customizations. Something like this:

$( '#calendar' ).calendario( {
	onDayClick : function( $el, $contentEl, dateProperties ) {

		for( var key in dateProperties ) {
			console.log( key + ' = ' + dateProperties[ key ] );
		}

		$('.fc-row > div').removeClass( 'calendar-day-selected border border-danger' );
		$el.addClass( 'calendar-day-selected border border-danger' );

	},
	caldata : canvasEvents
});

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

M
marinos13Feb 25, 2021

Thank you very much! it works perfectly

S
SemiColonWebSTAFFFeb 25, 2021

Hello,

Very Happy to Help!

Do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard