Smart Date 2.0: Let's Do This Again!

outer space

The first stable release of Smart Date delivered on my original vision for the module, namely, the need for a more app-like editor experience and intelligent formatting of dates and times in Drupal.

Thanks to feature requests and input from others in the Drupal community, it also included several enhancements that I had not originally thought for it to include - such as structured markup for more customizability, support for zero duration events, and better deduplication in formatting time and date ranges.

It was mid-2019 when we shared the first stable release of Smart Date. In the months since it’s been great to see its growing adoption by the Drupal community. 

What's New In Smart Date 2.0

Smart Date 2.0 is the latest major release (February 2020) of the Smart Date module. It contains many new features and optimizations inspired by and directly supported through Drupal’s active community and contributions of code. 

Recurring Events Made Easier in Drupal

Many websites - including a number of sites built by Digital Echidna - use the excellent Recurring Date Field module to handle recurring events. The only downside is that this module stores recurring instances separately, which changes how views need to be built to show them and requires special integration with other modules. 

Smart Date 2.0 stores the generated instance as standard field values. A single view lists recurring and non-recurring dates together. Any other modules that already work with Smart Date (such as Fullcalendar View) will work with Smart Date’s recurring dates:

screen view of recurring dates editor

Ready for Fullcalendar View 3.0

Speaking of calendars, at this point in time, using Smart Date with Fullcalendar View requires a patch. Mingsong, the maintainer of Fullcalendar View, plans for the 3.0 release to include an API to support additional integrations. Smart Date 2.0 has already implemented this API, and will work with Fullcalendar View 3.0 when it’s released.

Ability to Assign Timezones to Dates

We heard from the Drupal community that they wanted the ability to assign timezones to dates. For example, when building a site that lists concert tour dates, each event needs to show with the time in the local time zone. With Smart Date 2.0, a widget supports assigning these kinds of localized time zones on a per-date basis. When displayed, it shows the date in its specified timezone, but also reflects the site or user’s time, for the same date.

More Display Options for Date Values

For recurring dates, a special formatter now shows a translatable output of the recurring rule, with a configurable number of previous and upcoming instances:

date value display options

Smart Date users also requested that it allow the display of the start time and duration instead of the range from start to end. Thanks to Drupal’s object-oriented architecture, this was pretty easy to implement. Examples:

date options

Optimized for Claro and Adminimal

An exciting part of Drupal’s 8.9 release was the inclusion of the new Claro admin theme. Besides a design refresh, Claro is also built for accessibility. Smart Date 2.0 works as well with Claro as it does with Seven, and has also been tweaked to work well with the popular Adminimal admin theme.

Tested for Accessibility

Developing for inclusion is something of a passion for us at Digital Echidna, so this release includes accessibility improvements, for both the core widget and recurring dates elements.

Ready for Drupal 9

This release has been tested with the most current tools available to be ready for Drupal 9. It will likely need a few more tweaks before the planned release of Drupal 9 on June 3, 2020 but we will do our best to have Smart Date ready!

Bonus... A Module Starter Kit

We now also created a Smart Date Starter Kit to get you up and running quickly. If you just want to test it out, or maybe want to drop a simple implementation into a site build you’re working on, this starter kit will create an Event content type with an associated view to show upcoming and recent events in different tabs.

Community Contributions

I’m extremely grateful for all the positive feedback we’ve received so far, how the Drupal community has embraced Smart Date, and how they have helped it address a far broader set of use cases than I could have ever imagined on my own.

In that spirit, I want to introduce you to one of the community members who has been a passionate contributor to Smart Date on a variety of issues, Stefan Korn. Stefan is an Acquia Certified Drupal Developer and a freelancer in central Germany.

I recently connected with Stefan over email (I live and work in Canada) to ask him a few questions about his experience using Smart Date. 

This following is a transcript of our interview. 

When did you start using Drupal, and what got you into it?

I started using Drupal in 2011, starting with my first few projects in D6 but quickly turning to D7. A customer asked me about my opinion on Drupal and so I took a look and soon got hooked with Drupal.

What types of sites or other applications do you like using it for?

I am using it for all kind of sites, from brochure websites to eCommerce and bigger web sites. I am actually more or less only working with Drupal, so you name it …

Other than helping with modules, are there other ways you participate in the Drupal community?

I have occasionally been to Drupal Meetups in the Rhein/Main area (Frankfurt, Germany). I am participating in Drupal Stackexchange and a German Drupal forum, but not too frequently. Due to my freelance work I am in contact with several organizations, companies, agencies and people that are using Drupal.

How did you first hear about Smart Date?

I was searching for a more flexible date solution for D8 and was weighing between Smart Date and Datetime Extras. Smart Date made it and I am happy about that. It was even before 2.x and the cool recurring date feature, so the best part was still to come.

What were your first impressions?

First impression was very good, it solved the problem I was encountering with the core date (displaying the date exactly to my customers liking, using all day option).

You’ve contributed a lot of code fixes. Do you find it challenging to find the time for this work?

Yes, it’s challenging to find the time and since I am a self-employed freelance developer I also need to look at where to get the “Bucks” from and that’s sometimes difficult to align with code contribution …

Have you launched any sites yet with it?

There is one site that should be launched soon and I am planning to use it for a project of my own too.

Are there any changes or new features you’d like to see in the next major version?

I am generally into having a very good UI for the entering dates (quick and intuitive). I am also curious about views integration, which I haven’t tested very deeply so far.

Are there other pain points you’ve encountered in using and managing times and dates in Drupal?

Not specifically, I think the core datetime truly lacks some features to make it a viable solution in a project that is using dates and times at its core. So there is really a need for Smart Date.

[end of transcript]

The Path Forward

It’s so exciting to see Smart Date continue to evolve. I’m looking forward to seeing where the ongoing engagement with the Drupal community will take it next.

Categories
Questions Answered

What is the Drupal module smart date?

How do I implement recurring events in Drupal?

What are some success stories of contributed modules and their creators?

SUBSCRIBE TO OUR E-NEWSLETTER

CONNECT WITH US

Twitter Facebook Linkedin RSS