We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can we customize the library CSS on an event.

Thread ID:





148783 Nov 4,2019 01:46 PM UTC Nov 7,2019 12:01 PM UTC React - EJ 2 3
Tags: Schedule
Sudhanshu Jain
Asked On November 4, 2019 01:46 PM UTC

For example i want to draw appointment as a line .so i want to override class="e-appointment e-lib e-draggable".here i can set the update css class and provide the new attributes.

Vinitha Devi Murugan [Syncfusion]
Replied On November 5, 2019 01:34 PM UTC

Hi Sudhanshu, 
Syncfusion Greetings 
We have prepared the sample to show the appointment as a line using below CSS 
.e-appointment.e-lib.e-draggable.e-schedule-event-clone.e-drag-clone { 
    height: 4px !important; 
    height: 7px !important; 
M.Vinitha devi 

Sudhanshu Jain
Replied On November 6, 2019 06:20 AM UTC

I want library Css change on event.So in this page i will have some appointments as rectangle and some will be as line .So if i apply above fix it will give all the appointments as line .
So i want create  event template i will create different task template .

Please have a look in below eventTemplate.
eventTemplate (props: Object) {
const taskType = getLodash(props, 'type');
if (props.taskType === 'task') {
return (
<div className={styles.taskBarTemplate}
style={{ background: props.statusColor }}>
{props.taskAtRisk ? <div className={styles.cornIconMargin}>
<CornWarning/></div> : null}
<div className={styles.nameTimeMargin}>
<div className={styles.nameFont}>{props.tId}</div>
{moment(props.startTime).format('h:mm a')} - {
endTime).format('h:mm a')}
} else if (props.taskType === 'breakTime') {
return (
<div className={styles.breakTimeTemplate}>
} else if (props.taskType === 'travelTime') {
return /*There i want to change library CSS .So that if props.taskType === "travleTime" it will change library CSS only for that.

Vinitha Devi Murugan [Syncfusion]
Replied On November 7, 2019 12:01 PM UTC

Hi Sudhanshu, 
Thanks for your update. 
We achieved your requirement by making use of eventRendered event of the scheduler for the same we have prepared below sample. 
onEventRendered(args) { 
    if (args.data.EventType === "Requested") { 
    } else if (args.data.EventType === "Confirmed") { 
    } else if (args.data.EventType === "New") { 
M.Vinitha devi 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon