FieldtypeRecurringDates by Eduardo San Miguel Garcia

Field that stores recurring events from a UI to define RRules.

This is a pre-release please do not use in production.

FieldtypeRecurringDates

inputfieldrecurringdates

Fieldtype and Inputfield for definining recurring dates according to RFC-RFC 5545 and the awesome library php-rrule

Installation

composer require elabx/fieldtype-recurring-dates

Make sure to install both FieldtyeRecurringDates and AlpineJS modules. Additionally you may install RecurringDatesFinder for search operations.

Or download through the processwire modules directory.

This module will save the RRules occurrences in the database to be queried later.

Find pages with fields

Use date values valid for date selectors.

$pages->find('recurring_meetings=>today')

Finding occurrences

You can use the module included in this same package to find the rules occurrences:

$start and $end value are any acceptable value for $datetime

$finder = $modules->get('ReccurringDatesFinder')
$output = $finder->find(
     // from date
    'today',
    // to date
    '+30 days',
    $selector, [
        'fields' => [ // Will find event occurrences in fields specified in this array
            'recurring_meetings',
            'recurring_events'
        ]
    ]

This method will return the SQL UNION result of specified fields.

You can also hook into getRecurringFieldQueries() to add queries that will get added to the final UNION query.

TODO

  • [ ] Add support for BYSETPOS
  • [ ] Add support for 'Never' option.

Wishlist

  • [ ] Support for plain text RRule.
  • [ ] Add support for BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYMINUTE, BYHOUR, BYMINUTE, BYSECOND .
  • [ ] Add support to modify RRule before saving? Maybe skips
  • [ ] Use RSet instead of RRule?

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #549
    In the 549th issue of ProcessWire Weekly we’re going to check out the latest core updates, highlight one older yet still very relevant third party module, and more. Read on!
    Weekly.pw / 17 November 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK