-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding different color of event to the calendar based on category. #158
Comments
@yewness You need to change the color with css. |
right, and I think you should use with custom template |
hi twinssbc, can you show a sample code snippet on both html and typescript file that customize the calendar view color of each day of the month? thanks |
@wondergeek
In ts, you could add your customized logic to calculate a style/class based on the current date or events.
|
this is what i did and it worked. Hope this helps. |
I think this is what is happening If you are using the example i posted above, its because you have 1 type of events in your array. Dates without events are not getting displayed due to the statement entered in your custom template. for eg. {{view.dates[row*7+col].label}} view.dates[row*7+col].events:- will only display dates having events. Or you could add other dates having no events to events array and keeping allDay:true and display color:black and then use the same custom template. That should work. |
Thank you very much ! I'm sorry, I'm a beginner... If "view.dates[row*7+col].events" display only dates having events, is there another property to display all dates ? I don't know how to use *ngIf... if you have a sample code showing what I want to do, it would be very nice! thank you very much for your help !! |
@scortex84 var events=[]; //in template
/* /* Hope this helps. |
thank you very very much !! :-) |
Hi. |
@Titoch Sorry, it seems your comment is not complete. The css class on the parent DOM is fixed. But you could override the styles for the css class. For example, you could set the background color of the parent DOM as transparent, then set different background color for the inner DOM element. |
my calendar dates are not showing and the view collapsed after adding different colors for different events.following is the template
|
@rajkishoreandia I think it's just some DOM and CSS manipulation issue. You could use the browser developer tools to hover on the elements to figure out what's wrong? |
Hi, |
Same problem as @rajkishoreandia . Did you manage to solve it? |
Hi, |
I am trying to implement a monthly calendar that has schedules and holidays. Does the plugin have default way to change the color of the event or I have to change it with css? Let's say green for schedule and blue for holidays.
The text was updated successfully, but these errors were encountered: