Search
Version History
Introduction
General Information
What's New In This Release
Version History
Getting Started
Code Completion With VSDoc IntelliSense
Programming Interface Overview
Tutorials
Reference
Licensing
Online Resources
Technical Support
MindFusion Products

The list below describes past changes and additions to MindFusion.Scheduling for JavaScript:

## New in version 2.0

### ES6 modules

JsScheduler distribution now includes a set of ES6 modules, in Scripts/esm folder, that lets you import the classes from respective scripts. The distribution still includes ES5-compatible scripts located in Scripts/umd folder, which are transpiled from current ES6 code, and whose classes are exposed as members of global MindFusion namespace object as in previous versions.

### Localization improvements

Date and time localization of the Calendar can now be done via the CLDR locale data JSON distributions, instead of writing the "date" object in the localization file. You can continue using the localization files for string localization. For more information see the Localization topic.

### API changes

- JsScheduler source code has been refactored and is now dependent on the following MindFusion shared libraries: drawing, controls, common, and common.collections.
- The distribution includes ES5-compatible scripts located in Scripts/umd folder, whose classes are exposed as members of global MindFusion namespace object.
- The Scripts/esm folder contains ES6 code that lets you import the classes from respective modules.

### Moving to version 2

- For projects that access MindFusion namespace from the global namespace, check the "Loading UMD namespaced scripts" section in Getting Started guide.
- For projects that use module loaders, check the various "Loading ... modules" sections in Getting Started guide.
- For TypeScript projects that access MindFusion namespace from the global namespace, add a reference to the common.d.ts and global.d.ts files.

## New in version 1.2.1

- The registerClass method of the Schedule class allows you to register custom types for serialization support. Members of your custom class will be serialized with the schedule. You should override saveToXml, loadFromXml, toJson, fromJson in your custom class.

  JavaScript Copy Code
  //register the CustomEvent class var p = MindFusion.Scheduling; p.Schedule.registerClass(CustomEvent, "[custom:customEvent]", "customEvent", 1);

  If you don't register your custom class, but it derives from one of the library classes that support serialization (Item, Task, Resource, Contact etc.), your class will be serialized the way the base class is serialized.
- Serializing the JS Calendar schedule is now uniform with the serialization in MindFusion .NET and Java Scheduling libraries.
- The itemDraw event has been added to the Calendar class. It is raised when schedule items are drawn. An instance of ItemEventArgs provides you data about the event and allows you to access the DOM element of the Item that is drawn.

  JavaScript Copy Code
  // attach a handler - when the item is drawn calendar.itemDraw.addEventListener(onItemDraw); function onItemDraw(sender, args) { args.rawEventArgs.target.setAttribute("style", "color:red; border: 1px solid blue;"); }

## New in version 1.2

#### Calendar

- startTime and endTime read-only properties return the time of the first and last visible calendar cells.
- itemsStartTime and itemsEndTime read-only properties return the time of the first and last calendar cells, that can contain items.
- getItemCells method returns the calendar view cells that hold the specified item's visual elements.
- getCellItems method returns the items, whose visual elements are contained in the specified calendar cell.
- getItemDom method returns the specified item's visual elements.
- itemsChanged and itemsChanging events are raised whenever the user has changed or tries to change the calendar's schedule collections of items and resources.
- all item interactions (drag, resize, in-place edit) now raise the itemModifying and itemModified events. The type of interaction is stored in the ItemModifiedEventArgs.action field

#### Schedule

- getAllItems method retrieves all events, including recurrent item instances, scheduled to occur in the specified time interval.
- itemsChanging, itemsChanged events are raised when items are added and removed from the items collection.

#### BaseForm class

- calendar and item read-only properties allow access to the underlying calendar and the modified item.
- element, header, content properties return references to the corresponding DOM elements.
- controls property returns a dictionary, containing references to all controls present in the form.

#### Miscellaneous

- Day headers in month and week views can now be set to fill the whole day cell via the expandDayHeaders property of the corresponding settings class.
- localization json files.
- updated themes.

## New in version 1.1

- ItemSettings.titleFormat and ItemSettings.tooltipFormat properties to better control the appearance of schedule Items.
- VSDoc intellisense
- React samples
- Improved API documentation to include class inheritance.