Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

505
Views
Angular10 Syncfusion cómo dar colores dinámicos a eventos de citas

Estoy trabajando en una aplicación angular donde estoy usando el programador syncfusion para mostrar citas en el calendario. Quiero dar color dinámico o clase a los eventos para poder hacer algo de estilo. No estoy seguro de cómo hacerlo. La única forma en que puedo hacerlo es agregando un color de categoría en los eventos.

ingrese la descripción de la imagen aquí

Quiero lograr diseñar los eventos en el calendario como una imagen pero no con un solo color. Quiero usar diferentes colores. A continuación se muestra mi código

 <ejs-schedule #scheduleObj class="schedule" cssClass='schedule-group-custom-work-days' width='100%' height='650px' [selectedDate]="selectedDate" [eventSettings]='eventSettings' [showQuickInfo]='showQuickInfo' (cellDoubleClick)='cellDoubleClick($event)' (popupOpen)='onPopupOpen($event)' (actionComplete)="onActionComplete($event)" (eventRendered)="onEventRendered($event)" (renderCell)="onRenderCell($event)" [workDays]='workWeekDays'> </ejs-schedule>

componente.ts

 @ViewChild('scheduleObj') public scheduleObj!: ScheduleComponent; public eventSettings: EventSettingsModel = { dataSource: [] }; public selectedDate: Date = new Date(); public workWeekDays!: number[]; events: any[] = []; getAppointment(){ //api call and got response const events: any[] = []; events.push({ Id: appointment.id.toString(), Subject: appointment.patientFirstName + ' ' + appointment.patientLastName, // BELOW IS THE VARIABLE WHICH I AM USING FOR ADDING BACKGROUND COLOR AS RED CategoryColor: "red" StartTime: startDate, EndTime: endDate }); this.events = events; this.eventSettings = { dataSource: <Object[]>extend([], events, null, true) };

¿Hay alguna manera de que pueda agregar clase a mis eventos o alguna forma de diseñar mis eventos con diferentes colores?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede usar el color o la clase diferente para los eventos haciendo uso del campo cssClass en el modelo de cita. Para obtener más referencias, visite la siguiente página.

https://ej2.syncfusion.com/angular/documentation/schedule/appointments/#using-cssclass

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!