Comments (10)
I don't have anything setup for multi-day events right now, definitely could be added in the future.
To me, this is more of a display thing. As long as the calendar provides some meta-data for the end time of the event, the Javascript + CSS could control how it's displayed.
My suggestion, for now, would be to use the block for rendering the item and use it to apply a class to the element. This way you can use CSS to make the item an absolute width that's X amount of days wide. This might require some modifications to add some extra divs or entries inside the calendar so that everything can be styled properly though.
from simple_calendar.
Cool, ok - thanks for updating.
from simple_calendar.
+1
from simple_calendar.
I need this for a site I'm working on so will fork and see if I can add that feature :)
from simple_calendar.
Sweet @deanperry. Let me know if there's anything I can do to help. :)
from simple_calendar.
I've just seen in a different issue that you've rewritten the gem and it's
in the 1.0 branch. Shall I make the changes there or create a branch off
master?
On 1 Dec 2013 23:45, "Chris Oliver" [email protected] wrote:
Sweet @deanperry https://github.com/deanperry. Let me know if there's
anything I can do to help. :)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-29587019
.
from simple_calendar.
Yeah try using that branch if you can, it's far more flexible and probably how things will be going forward.
from simple_calendar.
I've looked at doing this and the way I've figured it could work is to create a separate class, like a service object. Call it something like EventDay, it only needs to respond to the start_time
method. You can serialize a multi-day event into several EventDays, and you can simply pass an array of EventDays to the calendar instead of the Events themselves.
How you style it after that etc is up to you of course.
Great gem. Really like it. We'll be using it at our new events product.
from simple_calendar.
Thanks John! That's a good approach.
from simple_calendar.
v1.1 yields a block to the entire day so it should be significantly easier to do multi-day events now. You can pull your recurring events and inject them into a day rather than having to pass them into the calendar first.
from simple_calendar.
Related Issues (20)
- Best way to manually set today, past and future classes HOT 1
- Add Ruby 3.1 to GitHub Actions HOT 1
- Add Rails 7.0 to Appraisals HOT 1
- Add test/dummy Rails application with example calendar views
- Switch tests to Minitest HOT 2
- Add example wrapping calendar with a Turbo Frame HOT 1
- Feature Request: allow ignoring of end_time for events HOT 2
- End Time Question HOT 1
- Adding simple_calendar styles to the Rails 7 application raises an error HOT 2
- Events elements not rendered inside calendar HOT 3
- Can't find stylesheet to import HOT 3
- Update README Custom Calendar render call and required view helper HOT 1
- undefined method `reject' for nil:NilClass HOT 4
- Rails 7.1 Beta1, calling month_calendar fails with stack level too deep. HOT 8
- undefined method `week_calendar'
- Add recurrence support
- Readme file gem version don't fully support provided documentation HOT 1
- Display birthdays
- Feature request: Add a css selector to the day-date in month calendar HOT 1
- Any interest in a HAML generator? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple_calendar.