Skip to content

Releases: Snater/CLNDR2

2.1.0

22 Sep 13:19
Compare
Choose a tag to compare

Enhancements

  • Support date-fns version 4.x, in addition to 3.x.

Fixes

  • #22: Declared format function's options parameter optional.
  • #23: Added destroy() method.

Documentation

  • Added examples for different templating engines to the Readme.
  • Updated React example in the Readme.

2.0.0

01 Jul 10:53
Compare
Choose a tag to compare

While version 1 was more like a renovation and sanitazation of the CLNDR source code, version 2 of CLNDR2 eventually is a complete rewrite allowing new features to be added.

New key features of CLNDR2 2.0

  • Instead of rendering days and month, the calendar now supports consistent day, week, month, year and decade views that can be activated and configured per options.
  • It is now possible to switch between views, for example to switch between year, month and day view to ease navigation.
  • Asynchronous callbacks now allow events rendered by the calendar to be updated asynchronously while navigating.

Breaking changes

All internals and interfaces of CLNDR2 have been reevaluated in order to improve consistency, ease understanding the concepts, and accomodate the extended modularity of CLNDR2. While in CLNDR2 version 1.x, "month" and "day" was a static concept—a "month" rendering multiple "days", the 2.x equivalent is "item"—a "page" renders multiple "items". This conceptual change also results in changing default CSS classes and names of parameters passed to the template(s).

Version 2.x being more of a rewrite, many concepts have been changed fundamentally. The following lists are supposed to give pointers to what has been changed. Please consult the Readme and documentation on details.

Options have been changed

  • adjacentDaysChangeMonth has been renamed to adjacentItemsChangePage.
  • clickEvents has been renamed to on.
  • doneRendering has been moved to on.afterRender.
  • dateParameter has been now supposed to be an object instead of a string and may be used to configure both, the key to locate the single-day date parameter in the event objects provided to the events option, as well as the multi-day date parameters. The default date parameters for multi-day events changed from startDate and endDate to start and end.
  • lengthOfTime option has been replaced with pagination. There is now a pagination option that may be used to configure the size of pages and the navigation step.
  • multiDayEvents option has been removed. CLNDR2 now supports both single- and multi-day events by default. Just provide your events to the events option and configure dateParameter if not using the default keys for locating the event dates.
  • ready has been moved to on.ready.
  • showAdjacentMonths has been renamed to showAdjacent.
  • startWithMonth has been renamed to startOn.
  • weekOffset has been renamed to weekStartsOn.

Data provided to the template has changed

  • days has been replaced by the generic items parameter.
  • months has been replaced by the generic pages parameter.
  • year and month have been superseded by a generic date parameter that may be used to extract that information from.
  • eventsLastMonth, eventsNextMonth, eventsThisMonth and eventsThisInterval have been replaced by events which contains the events for the currentPage, the previousPage and the nextPage.
  • intervalStart and intervalEnd have been replaced by interval.

Interaction events have been changed

  • All interaction event callbacks are now aggregated in the on options.
  • today, nextYear, nextMonth, nextInterval, previousInterval, previousYear, onYearChange, previousMonth, onMonthChange, previousInterval, onIntervalChange have all been replaced by the navigate callback that provides parameters to identify the nature of the navigation action.
  • The parameters of all callbacks have been revisited.

Full Changelog: v1.0.1...v2.0.0

1.0.0

01 Feb 16:29
Compare
Choose a tag to compare

Initial release.