Calendario Selected date

3 replies · opened Feb 24, 2021

Mmarinos13Feb 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?

SSemicolon WebSTAFFFeb 24, 2021

Hello,

Unfortunately, this is currently not supported out of the box and will need some JS Customizations. Something like this:
[ch_pre type="js"]$( '#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

});[/ch_pre]

Hope this Helps!

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

Mmarinos13Feb 25, 2021

Thank you very much! it works perfectly

SSemicolon WebSTAFFFeb 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