jQuery recurrenceinput widget

Jquery plugin widget which support the definition of complex recurrence rulesets based on RFC5545, the iCalendar standard.

The recurrence rule string, generated by this package, should be directly usable in ics calendar files. It was developed for the plone.event PLIP10886 and is used there to define python-dateutil rrulestr instances.

http://github.com/collective/jquery.recurrenceinput.js/raw/master/Screenshot_thumb.png

Features

  • The recurrence widget supports most of the options of the iCalendar RRULE as well as EXDATE and RDATE.
  • It supports internationalization.
  • It supports predetermined recurrence rules, so called "templates".

Non-Features

This widget does not support all features of RRULE's. For example:

  • It does not support recurrence on smaller than daily basis.
  • In RRULE'se end-dates can end either be in local time or in UTC. This widget only supports UTC, which means the start and end dates of the event as a whole, when exported may not be in local time. They must either specify a timezone or be in UTC. If the RRULE fed to the widget is in local time, this will be made into UTC with no timezone translation.
  • Any parameters will be ignored and stripped on saving the rule.

Known bugs

To Do

High priority:

  • 100% code coverage from tests (currently 96%).

Medium priority:

  • Make it possible to change the order of the fields as a part of the i18n. (jQuery templates)?
  • The human readable output should probably be done directly from the RRULE and not by using the form i18n, to improve the grammar and rule support.

Low priority:

  • Support more obscure RFC5545 options.

Developer information

To test, demo or develop jquery.recurrenceinput locally you need to run a local XML-RPC server, in the test_server.py script.

This server requires the dateutil module, so you must install it first. Here are some examples of how to do this, depending on your platform:

Debian/Ubuntu:

$ sudo apt-get install python-dateutil

A non-system Python 2 with setuptools or distribute installed:

$ <pathtopython>/easy_install python-dateutil==1.5

The demo/input.html document contains basic usecases and can be used when developing on this widget. For these to work you either need to have them on a webserver, or you need to tell your web-browser to allow Ajax loading from your local hard drive.

In Firefox you allow this by going to about:config and setting security.fileuri.strict_origin_policy to false.

In Chrome and Chromium you allow this by starting Chrome with --allow-file-access-from-files as a parameter.

You also need to run the tests. These are located in tests/tests.js, and use the QUnit test framework. You run them by opening tests/test.html in the browser. The same issue with allowing Ajax from the local hard drive is in effect for the tests as well.

In the tests directory there is also a copy of jslint.js, for easy access. To run these you need to install a JavaScript engine, such as Rhino or SpiderMonkey. You then run it with:

$ js tests/jslint.js <file>

The following files should be jslinted:

src/jquery.recurrenceinput.js
src/tests.js

To keep the Coverage tests updated you need to install jscoverage ( http://siliconforks.com/jscoverage/ ). You then keep the coverage code updated by running:

jscoverage src/ coverage/

To run the coverage tests you go to http://localhost:8000/coverage/jscoverage.html?/tests/coveragetest.html

Contributors

This project was originally started by Rok Garbas.

Authors:
  • Lennart Regebro
  • Rok Garbas
  • Vilmos Somogyi
  • Johannes Raggam
  • Mike Rhodes
  • Kai Lautaportti

Thanks to Hexagon IT, http://www.hexagonit.fi/, who funded the main body of work, done by Lennart Regebro.