Skip to content
This repository was archived by the owner on Mar 4, 2021. It is now read-only.

Commit 2ef6cd9

Browse files
committed
Feature: UpdateData Method for Organizer
This is to make it easier for the user to update the Calendar Data It is done by updating the Data variable, and then updating the organizer. In addition, updating the indicated events in case they were being shown.
1 parent 46c9aeb commit 2ef6cd9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

calendarorganizer.js

+7
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,13 @@ Organizer.prototype.update = function () {
484484
this.showEvents();
485485
};
486486

487+
Organizer.prototype.updateData = function (data) {
488+
this.data = data;
489+
490+
this.indicateEvents();
491+
this.update();
492+
};
493+
487494
Organizer.prototype.list = function (data) {
488495
var container = document.createElement("UL");
489496
for (var i = 0; i < data.length; i++) {

0 commit comments

Comments
 (0)