widgetti / widgetti/ipyvuetify
Calendar events color
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 355
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm testing out features with the Calendar and I noticed I can't control the event colors when specifying it directly in the events.
The only way to change the color is using the calendar's event_color property. This sets all the events to have the same color, which isn't really desired in this case.
While I'm at it, I thought I could use the type='category' and group by the available categories from my events to distinguish them, but with type='category', the widget doesn't actually render a calendar.
Appreciate any help to get this working.
Example:
import ipyvuetify as v
Define events with different types/colors
events = [
{'name': 'Weekly Sync', 'start': '2024-01-27 09:00', 'end': '2024-01-27 10:00', 'color': 'blue',"category":"A"},
{'name': 'Lunch', 'start': '2024-01-27 12:00', 'color': 'green',"category":"B"},
{'name': 'Project Phase 1', 'start': '2024-01-28', 'end': '2024-01-30', 'color': 'red', "category":"B"},
]
Create calendar
calendar = v.Calendar(
events=events,
event_color='yellow',
type='week',
value='2024-01-27'
)
calendar_categories = v.Calendar(
events=events,
categories =["A", "B"],
categories_show_all=True,
type='category',
value='2024-01-27'
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the v.Calendar entry point and its events, event_color, categories, categories_show_all, and type options. Reproduce both examples, then verify that individual event colors are honored and that type='category' renders a calendar grouped by the supplied categories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100