You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I first started using ice_cube to handle recurring dates, maybe a year+ ago, I wasn't sure how I could also handle recurrence information on the client side. I use rails in api mode to power an Angular application, so the recurring_select gem mentioned in the readme wasn't a good choice.
After some hunting, I found rrulejs, which was pretty nice but, at that time, poorly maintained and buggy. It also didn't support time zones and breaks the ical spec in a few places, and I had to patch ice_cube to work with it. Obviously not ideal (though in the past month one community member has stepped up and fixed most all of these problems).
So I ended up making my own javascript (typescript) recurrence library that supports the ICAL spec and can communicate to/from ice_cube via ICAL strings. You can check it out over at rSchedule. It works very well with ice_cube.
rSchedule has full timezone support (depending on what javascript date library you're using with it), so I've paired it with the ice_cube timezone branch in #455, though that isn't necessary if someone doesn't care about timezone support.
Anyway, thanks so much for building and maintaining ice_cube for all this time!!! Having build rSchedule, I know how incredibly time consuming that must have been...
For anyone interested in using ice_cube with a (javascript / typescript) client side app, I'd recommend checking out rSchedule, as just sending down a schedule's ICAL string and iterating the dates on the client side is much less data intensive then sending individual dates to the client from the server.
rSchedule supports RRULE, EXRULE, RDATE, and EXDATEs.
Example rSchedule usage with ice_cube
Server side
ical_string=schedule.to_ical
client side
constschedule=Schedule.fromICal(ical_string,StandardDateAdapter)for(constdateofschedule.occurrences()){// do stuff}schedule.occursOn({date: newDate()})// booleanschedule.occursOn({weekday: 'TU'})// booleanschedule.occurrences({start: newDate(),take: 10}).toArray().map(date=>date.toISOString())
@taylorbrooks rSchedule has no UI, it's purely a library for the logic. In this respect it is like ice_cube, except the processing happens on the client side.
In my case, I use it with angular-calendar on the client side (which supplies the UI), but there are other calendar libraries like full-calendar (plain javascript) that you can use it with (and I'm sure ones for React and Vue). Neither angular-calendar nor full-calendar provide any recurring logic (they are just UI), so you need to pair them with some sort of library like rSchedule (if you want to handle recurring dates).
I haven't made a demo site for rSchedule, but it has a wiki site that explains how to use it and shows off the API.
Activity
taylorbrooks commentedon Sep 5, 2018
@thefliik rSchedule looks cool. Is there a demo site that shows off the UI?
I'd love to look at other alternatives to
recurring_select.jorroll commentedon Sep 5, 2018
@taylorbrooks rSchedule has no UI, it's purely a library for the logic. In this respect it is like ice_cube, except the processing happens on the client side.
In my case, I use it with
angular-calendaron the client side (which supplies the UI), but there are other calendar libraries likefull-calendar(plain javascript) that you can use it with (and I'm sure ones for React and Vue). Neither angular-calendar nor full-calendar provide any recurring logic (they are just UI), so you need to pair them with some sort of library like rSchedule (if you want to handle recurring dates).I haven't made a demo site for rSchedule, but it has a wiki site that explains how to use it and shows off the API.
jorroll commentedon Sep 11, 2018
Btw, feel free to close this at any time
@seejohnrun. It was really just meant as an FYI and a thank you for making/maintainingice_cube:)seejohnrun commentedon Sep 24, 2018
Awesome - thanks for the heads up @thefliik this looks great!