Skip to content
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

Svelte 5 resource timeline #358

Open
ngDuyAnh opened this issue Oct 22, 2024 · 1 comment
Open

Svelte 5 resource timeline #358

ngDuyAnh opened this issue Oct 22, 2024 · 1 comment

Comments

@ngDuyAnh
Copy link

I wanted to inform you about an issue I encountered with your resource timeline component in Svelte 5. Upon initialization, the date and time in the header do not render correctly—the column values are initialized, but the display strings are empty, which causes the layout to break. Interestingly, when moving to the next day, everything renders properly, so it appears to be an issue specifically related to initialization.

To continue using the component, I’ve downgraded to Svelte 4, which resolves the problem. Thank you so much for developing this component—I really appreciate your work!

I've attached the code below if you'd like to investigate further:
`

<script> import Calendar from '@event-calendar/core'; import ResourceTimeline from '@event-calendar/resource-timeline'; let plugins = [ResourceTimeline]; let options = { view: 'resourceTimelineMonth', nowIndicator: true, headerToolbar: { start: 'prev,next today', center: 'title', end: '' }, resources: [ { id: 1, title: 'Conference Room A' }, { id: 2, title: 'Main Hall' }, { id: 3, title: 'Room B' } ], pointer: true, slotWidth: 80, events: [ { id: 'event1', resourceId: 1, allDay: false, start: new Date(2024, 9, 20, 10, 0), // October 20, 2024, 10:00 AM end: new Date(2024, 9, 20, 12, 0), // October 20, 2024, 12:00 PM title: 'Team Meeting', editable: true, startEditable: true, durationEditable: true, display: 'auto', backgroundColor: '#ffcc00', textColor: '#000000' }, { id: 'event2', resourceId: 2, allDay: true, start: new Date(2024, 9, 21), // October 21, 2024 end: new Date(2024, 9, 21), title: 'All-Day Workshop', editable: true, startEditable: true, durationEditable: true, display: 'auto', backgroundColor: '#4caf50', textColor: '#ffffff' }, { id: 'event3', resourceId: 3, allDay: false, start: new Date(2024, 9, 22, 14, 0), // October 22, 2024, 2:00 PM end: new Date(2024, 9, 22, 15, 30), // October 22, 2024, 3:30 PM title: 'Client Presentation', editable: true, startEditable: true, durationEditable: true, display: 'auto', backgroundColor: '#2196f3', textColor: '#ffffff' } ] // events: [], }; </script>

<Calendar {plugins} {options} />

`

@vkurko
Copy link
Owner

vkurko commented Oct 28, 2024

Thanks, Svelte 5 support is in the works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants