Skip to content

Commit

Permalink
- Fixed issue where Calendar wanted to jump to startposition, while n…
Browse files Browse the repository at this point in the history
…o context object is available resulting in calendar not being rendered
  • Loading branch information
RoelandSalij committed Jun 17, 2015
1 parent 520ba8d commit 3f790df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/calendar/widget/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@ require({

startup: function () {
console.debug('Calendar - startup');

if(this._hasStarted) {
return;
}
this._hasStarted = true;

//make a calendarbox
this._calendarBox = dom.create('div', {
'id': 'calendar_' + this.id
});
domConstruct.place(this._calendarBox, this.domNode);

this._fcNode = $('#calendar_' + this.id);
this._fcNode = $(this._calendarBox);

this._renderCalendar(null);
},
Expand Down Expand Up @@ -355,7 +361,7 @@ require({

this._fcNode.fullCalendar(options);

if (this._mxObj.get(this.startPos)) {
if (this._mxObj && this._mxObj.get(this.startPos)) {
this._fcNode.fullCalendar('gotoDate', new Date(this._mxObj.get(this.startPos)));
}
else {
Expand Down
Binary file modified test/Widgets/Calendar.mpk
Binary file not shown.
Binary file modified test/[Test] Calendar Widget.mpr
Binary file not shown.

0 comments on commit 3f790df

Please sign in to comment.