My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2407: view.title is null in viewRender
3 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Feb 2015


Sign in to add a comment
 
Reported by cjwm...@gmail.com, Jan 8, 2015
Object 'view' property 'title' no longer seems to exist in latest version, despite being in documentation (http://fullcalendar.io/docs/views/View_Object/).

Example of bug is here, see viewrender listener:
http://jsbin.com/keyibu/5/edit?js,console,output

Fixed in own verion 2.2.5 by extending view object with 'title' property and then in computeTitle(), line 6313:

	computeTitle: function() {
		return this.title = this.formatRange(
			{ start: this.intervalStart, end: this.intervalEnd },
			this.opt('titleFormat') || this.computeTitleFormat(),
			this.opt('titleRangeSeparator')
		);
	},

Jan 10, 2015
#3 war...@gmail.com
it works, but only when changing the view. The first load of the calendar for some reason doesn't set view.title with this code.  If I move to the next week/month whatever, then it fills in the view.title, with the previous week/month data :(
Jan 10, 2015
#4 war...@gmail.com
Found a solution:
Place the code 
this.title = this.formatRange(
			{ start: this.intervalStart, end: this.intervalEnd },
			this.opt('titleFormat') || this.computeTitleFormat(),
			this.opt('titleRangeSeparator')
		);

inside the View.js: renderView: function()...

Before this.trigger('viewRender'...);
Jan 10, 2015
Project Member #5 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Accepted
Labels: Type-Bug
Jan 10, 2015
Project Member #6 adamrs...@gmail.com
 Issue 2410  has been merged into this issue.
Jan 11, 2015
Project Member #7 adamrs...@gmail.com
This is fixed in v2.2.6. The omitted property has been restored. Sorry and thanks!
Status: Released
Jan 11, 2015
#8 war...@gmail.com
Still doesn't work :( Same issue, if i access the view.title inside the viewRender callback, it is blank now.
Jan 11, 2015
Project Member #10 adamrs...@gmail.com
Gah, I didn't test for it specifically in viewRender. It is indeed still undefined there. Will get that fixed in the next version.

NOTE TO SELF:
call View::updateTitle from View::setRange
Status: Accepted
Jan 11, 2015
Project Member #11 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: view.title is null in viewRender (was: view.title property no longer exists - still present in documentation.)
Jan 12, 2015
Project Member #12 adamrs...@gmail.com
Implemented (but not yet released)

https://github.com/arshaw/fullcalendar/commit/de08415b5bd79e58bb0317e2b856ecee52f6998b
Status: Implemented
Jan 13, 2015
#13 war...@gmail.com
That seems to solve it! Thanks!
Feb 10, 2015
Project Member #14 adamrs...@gmail.com
Released in v2.2.7.

https://github.com/arshaw/fullcalendar/releases/tag/v2.2.7

Thanks!
Status: Released
Sign in to add a comment

Powered by Google Project Hosting