Calendar Widget Start Position not working as intended

I'm currently using the calendar widget in my application and the start position attribute does not seem to function as I think it should. I have a template grid with the calendar in it. I set the data source to Microflow with context object, and then in the data view context part of the widget I've set the Start Pos Attribute to a date attribute in my entity. I assume that this works as follows: If the date in my date attribute is, for example, 1-12-2014 then my calendar should show (when it is set to week view) the week that starts on Monday first of december, but it still shows the current week (starting monday 15-12-2014). Am i not understanding how this attribute works or does it not work in a template grid? Or what else could cause this to happen
1 answers

I found a solution for your problem. Turned out it is a bug in the calendar widget. Follow the steps below to fix the problem.

  1. Go to the widgets directory (root of the project probably).
  2. Extract Calendar.mpk.
  3. Open calendar.js inside the extracted Calendar>calendar>widget folder.
  4. Search for the _renderCalendar function.
  5. Inside this function there's a comment that starts with //go to the startposition if we have one and below the comment there's an if with something like if (this._mxObj && ....
  6. Copy the comment and the complete if below.
  7. Search for update : function(obj, callback) {.
  8. Paste the copied part of the code right below this._fetchObjects(); inside the function.
  9. Save the file and create a new Calendar.mpk file with all the files as in the original but with the updated calendar.js.
  10. Run the project and now you'll see that the calendar shows the start position based on the attribute.