Smart Date 3.0 - the Intelligent Choice for Better Integration, Better Admin Experience

An image of a Drupal Drop and an Echidna, over the term Look Who's Drupaling Too, as an homage to the Look Who's Talking Too movie poster.

This week brought a new, stable release for Smart Date 3.0.0. You're welcome to dig through the various Smart Date release notes to read up on all the changes from the previous, 8.x-2.x branch but I thought I would use this space to talk about some of the key themes.

Support for Drupal core Date Range fields

One piece of feedback I've heard a number of times is that people wanted the Admin Experience (AX) improvements of Smart Date and its more natural formatting for date and time ranges, but were hesitant to depend on a contrib module for custom storage of their date values. Knowing that this was a barrier to adoption, I started to think about how Smart Date was started as effectively a fork of the core Date Range field. Given this common ancestry, it wouldn't be too hard to make at least some of Smart Date's functionality available to Date Range fields.

This is now possible in Smart Date 3. You can use the Smart Date widget, meant to draw best practices from popular calendar software from Google, Apple, and others, and leverage Smart Date Formats for formatting output. In fact, the latter is also available for core date and time fields, to make it easier to keep the output consistent across your site.

This means you can hedge your bets by continuing to use core fields for storage, but Smart Date to enhance your forms and output. It also makes Smart Date easier to drop into an existing site.

Unfortunately, there are some limitations to this mixed approach. For one, the setup for allowed duration values is moved to the widget configuration for core date range fields, which means they can't be enforced for content created programmatically, as an example. Also, you lose the performance benefits of storing your time values as timestamps. There are a variety of other minor concessions, but perhaps the most significant functionality you forego in this approach are the biggest features introduced in the 8.x-2.x branch: the ability to manually set time zones per event and Smart Date's practical and easy-to-use integration for recurring dates.

An easier Admin Experience out of the box

The primary goal for Smart Date when it was first created was to make life better for content authors. The new release continues to build on that effort, though in more subtle ways.

When using a Smart Date field that allows unlimited values (recommended in case you want to enable recurring events at any point), Smart Date now allows you to suppress the additional, empty field set Drupal creates in addition to the one for the default values. An author can still add more field sets as needed, but it's another change meant to make Drupal work a little more like the calendar software authors are using every day.

For sites where the timezone widget is used, the default set of timezones can be daunting to choose from. The Chosen module can help, but in a recent talk about Smart Date, an attendee asked if it was possible to choose which time zones would be shown in the dropdown. It was a great idea and not difficult to implement. If you need to have time zones associated with your events but don't need support for the long, global set of timezones, using this new configuration for Smart Date's timezone widget can make life significantly easier.

When formatting dates and times with time zones, Smart Date formats now do a better job of determining when there’s value in also showing the time in the site’s default time zone. You now also have the option to force your format to never append the site time.

Support for Drupal’s next-generation themes

There’s significant work underway to get Drupal’s gorgeous new Olivero theme into Drupal 9.1 as experimental and to move Claro towards being stable -- and eventually Drupal’s default admin theme. Meanwhile, during DrupalCon Global we kept hearing the buzz about Gin, the customizable, contrib cousin to Claro. We’ve grown to love Gin and have made it our default for new sites, especially as we transition to building sites in Drupal 9.

It only makes sense, then, for Smart Date to look great and function as expected in Olivero, Claro, and Gin. SmartDate 3.0 has made a variety of changes to make sure that whichever one of these your site uses, Smart Date will be a seamless addition.

Feedback is always welcome

There have been a number of other, smaller changes: better support for formatting German-language dates, improved Fullcalendar View integration, additional views options for recurring dates, and many more. 

As always, the best way to learn about the power and potential of Smart Date is to test it out yourself. I encourage you to try out the Smart Date module and I’d love to hear your feedback. After all, much of what makes Smart Date as feature-rich as it is today came from the Drupal community, either directly as patches, or as feature requests. 

Please feel free to open issues for ways you think the module could be even better, or reach to @mandclu on Twitter, or in the #datetime channel in Drupal’s slack.

Questions Answered

What is the Drupal module Smart Date?

How can I better represent dates on my web site?

What date modules are effective for Drupal 9?



Twitter Facebook Linkedin RSS