Our powerful JS Calendar component


Post by codevlabs »

Dear Support,

We are trying to update the event tool tip on our Ionic 7 project using the following code. Can you please help?

export const calendarConfig: Partial<CalendarConfig> = {
    date : new Date(),
	features : {
        eventTooltip : {
          titleRenderer( eventRecord ) {
				return 'Test';
			}
        }
    }
};

Option 1

  <bryntum-calendar
		  #calendar
		  [date]="calendarConfig.date!"
		  [project]="project"		 
		  [eventTooltipFeature]="calendarConfig.features.eventTooltip" 
	  ></bryntum-calendar>

error TS2532: Object is possibly 'undefined'. (screenshot)

<bryntum-calendar
			#calendar
			[date]="calendarConfig.date!"
			[project]="project"		 
			[eventTooltipFeature]="calendarConfig.features" 
		></bryntum-calendar>

No Errors but no title.

Thanks in advance

Attachments
option1 error.png
option1 error.png (17.14 KiB) Viewed 663 times

Post by alex.l »

Hi,

Isn't it because there is no ! in the end of config? Try to add it

[eventTooltipFeature]="calendarConfig.features!" 

All the best,
Alex


Post by codevlabs »

Thanks Alex


Post Reply