Smart Date 3.1 and Beyond
Today we made a stable release for version 3.1.0 of Smart Date, which expands the recurring date functionality by adding support for hourly or “by minute”/consecutive events. An example use case for this kind of recurring event is an appointment scheduler.
One of the benefits of using simshaun’s Recurr library is that support generating instances at these new intervals was already supported. That said, we needed to change a number of UI and formatting elements to make the new options easy to use. We wanted to make sure the display of much more frequent events would be, well, smart enough to not overwhelm website visitors.
An editor can now define specific hours within the day within which events can recur -- and even specify minutes on hour at which an event should occur. An example of this would be if you want something to recur every hour on the hour, but also at 15 and 45 minutes past the hour -- and only between the hours of 10 a.m. and 4 p.m.
For output formatting, the Recurring formatter will treat a day’s worth of such events as a single entry. In a similar way, the Daily Range formatter will reduce duplication of the date for times that recur within a day.
This release also provides some minor improvements in other areas, including the display of all -day events in other timezones, and a change to the layout of the widget for creating recurring events, to make it better aligned with popular calendar applications.
One benefit of so many Drupal camps and conferences being held virtually this year is that I’ve been able to attend a lot more of them than I normally would and share some of things I’m excited about in Smart Date. A request that’s come up a couple of times has been the ability to have “add to calendar” links in the display of times and dates managed by Smart Date. I’ve been giving it some thought and I think there’s an opportunity to provide this in a way that will work with other Drupal modules in the datetime space. More to come on that one.
Something else that’s come up is a request to have some custom information per instance of a recurring event. For example, a monthly meeting might want to provide information about who will be presenting at the next meeting, and the subject of their talk. I’m looking at a way to associate a content entity (likely a node) to an instance, so additional information can be provided. If you have thoughts on how this should work or use cases that should be considered, please comment below or on the relevant issue on drupal.org.
Speaking of monthly meetings, this Thursday, Nov. 19 I’ll be a guest speaker at the Drupal Yorkshire meetup. If you’d like to see a live demonstration of the setup and use of Smart Date (or if you have questions you’d like to ask), please join us! Things will get rolling at 6:30 pm GMT, or 1:30 pm EST for those of us in North America.