Recurring Dates in Smart Date
The submodule makes use of the RRULE library at https://github.com/simshaun/recurr but if Smart Date is installed via composer this dependency should be installed automatically.
To make the recurring date functionality available, install Smart Date Recur as you would install any Drupal module.
Next, you need to configure a Smart Date field to allow recurring dates. Note that this will only be possible for fields defined to allow unlimited values. For such fields, you can edit the field for your content type or other entity definition, and there will be a checkbox to allow recurring dates.
Once this is enabled, you will also see a field to define for what period of time Smart Date Recur will create instances. The value defaults to 12 months, but you can configure this to a different value as needed. Note that a cron job will generate additional instances on an ongoing basis, so that this date range of future instances is always available.
Note that once recurring rules are defined (using graphical UI elements in the Smart Date field interface) Smart Date Recur will generate field values, so no additional joins are required to display these values in views or other functionality that displays or otherwise accesses field values (including Fullcalendar Views).
In the display settings for a recurring date field, there is the option to display the next instance separately. When determining which is the next instance, the module will check for an exposed filter with the name of the field (for example, ?field_date=2022-08-22), and if it finds one, will display the next value greater than that value. If no such filter is found, it will display the next value greater than the current time.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion