search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

While printing Scheduler I'm getting text color error.

Asked by Akhtar Raza
2 years ago.

When I'm trying to print my scheduler. I'm not getting text color or Not getting written text. Have a look at the screenshot.

Comment posted by Akhtar Raza
2 years ago.

print() {

I'm using this code.

Answer posted by Dan Letecky [DayPilot]
2 years ago.

The Scheduler tries to read the actual event styles but it does it using a standard event (and not for every item). If you apply custom text color (and other properties) using a CSS class it won't be able to detect it during export.

It will use inline styles that you set using onBeforeEventRender (e.g. during export. Another option is to customize the export properties using onBeforeEventExport (args.fontColor):

Comment posted by Akhtar Raza
2 years ago.

Thank you for your reply.
Now I'm getting this error. I used this in my some component. There I'm not getting any errors.

TypeError: Cannot read properties of undefined (reading 'find')
at n (daypilot-core.js:29)
at Array.forEach (<anonymous>)
at Object.k.generate (daypilot-core.js:29)
at DayPilot.Scheduler.exportAs (daypilot-core.js:28)
at RosterComponent.push../src/app/scheduler/roster/roster.component.ts.RosterComponent.print (roster.component.ts:80)
at Object.eval [as handleEvent] (RosterComponent.html:68)
at handleEvent (core.js:23107)
at callWithDebugContext (core.js:24177)
at Object.debugHandleEvent [as handleEvent] (core.js:23904)
at dispatchEvent (core.js:20556)

It shows an error in the code.


Comment posted by Akhtar Raza
2 years ago.

First time printing working fine. If I second time clicks on the button to print then I'm getting this kind of error.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.