Giter Site home page Giter Site logo

Comments (10)

excid3 avatar excid3 commented on May 7, 2024

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.

asecondwill avatar asecondwill commented on May 7, 2024

Cool, ok - thanks for updating.

from simple_calendar.

joaofraga avatar joaofraga commented on May 7, 2024

+1

from simple_calendar.

deanpcmad avatar deanpcmad commented on May 7, 2024

I need this for a site I'm working on so will fork and see if I can add that feature :)

from simple_calendar.

excid3 avatar excid3 commented on May 7, 2024

Sweet @deanperry. Let me know if there's anything I can do to help. :)

from simple_calendar.

deanpcmad avatar deanpcmad commented on May 7, 2024

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.

excid3 avatar excid3 commented on May 7, 2024

Yeah try using that branch if you can, it's far more flexible and probably how things will be going forward.

from simple_calendar.

JonMidhir avatar JonMidhir commented on May 7, 2024

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.

excid3 avatar excid3 commented on May 7, 2024

Thanks John! That's a good approach.

from simple_calendar.

excid3 avatar excid3 commented on May 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.