question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to style events in week/month view

See original GitHub issue

Hi,

Super lib btw - really appreciate what you have done here!

Sorry for asking possible already answered question.

I am providing a custom event and toolbar via:

                        components={{
                            event: this.Event,
                            eventWrapper: EventWrap,
                            toolbar: CustomToolbar,
                            agenda: {
                                event: this.EventAgenda
                            },
                            week: {
                                event: WeekEvent
                            }
                        }}

And this works well - however I want to style the container of the Event. As you can see I have the EventWrap component defined but there is another wrapper between that and the event (the container of the event time and description, also the container containing the styles).

How can I style this container?

I am looking for an example if possible.

I did see in another issue someone trying to style an EventCell but I don’t see the api allowing to input EventCell ???

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
m-o-learycommented, Nov 13, 2017

Got it:

const eventStyles = {
    event: {
        backgroundColor:'#1C7DDB',
        color: 'white',
        borderRadius:0
    },
}

...

eventPropGetter={(event,start,end,isSelected)=>{
    return {
        style: eventStyles.event
    }
}}
0reactions
m-o-learycommented, Nov 6, 2017

You wouldn’t have an example of it in use for custom styling would you?

The reason I ask is because I am using the following code to style the event based on status:

import styles from './Scheduler.css'
...

eventPropGetter={(event,start,end,isSelected)=>{
    return event.status === 30 ? styles.approve:styles.tbd
}}

Scheduler.css:

.approved{
    background-color:#34B233;
    border-radius:0px;
}
.tbd{
    background-color:#FF7F45;
    border-radius:0px;
}
.rejected{
    background-color:#D04424;
    border-radius:0px;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Styling Month View - Knowledgebase | The Events Calendar
You can change the Month View styles with The Events Calendar by adding a snippet to your WordPress site.
Read more >
How to style events in week/month view · Issue #608 - GitHub
I am providing a custom event and toolbar via: components={{ event: this. ... How to style events in week/month view #608.
Read more >
Change how you view events in Calendar on iPhone
To change your view of Calendar, do any of the following: Zoom in or out: Tap a year, month, or day to zoom...
Read more >
Customize your calendar - Google Workspace Learning Center
In Calendar, click Settings "" and then Settings. On the left under General, click Event settings. Click Notifications and select an option:.
Read more >
The Events Calendar WordPress Plugin - YouTube
There are many different ways to customize The Events Calendar. Without any coding knowledge, ... 10K views 8 months ago The Events Calendar....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found