My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2371: Duplicate week number in date range formatting text
1 person starred this issue and may be notified of changes. Back to list
Status:  ExportedToGithub
Owner:  ----
Closed:  Aug 2015


Sign in to add a comment
 
Reported by hydrel...@gmail.com, Nov 21, 2014
When you use 'W' in titleFormat properties and firstDay set to 1, in agendaWeek view you display only one week. I expect the title display only the current week number, but it display the number twice.

See in jsfiddle : http://jsfiddle.net/3E8nk/879/

I can propose this fix, but I'm a noob in fullCalendar and not very experimented in jquery.

In formatRangeWithChuncks function : 

function formatRangeWithChunks(date1, date2, chunks, separator, isRTL) {
	var chunkStr; // the rendering of the chunk
	var leftI;
	var leftStr = '';
	var rightI;
	var rightStr = '';
	var middleI;
	var middleStr1 = '';
	var middleStr2 = '';
	var middleStr = '';

        //.... skip some code

	if (middleStr1 || middleStr2) {
		if (isRTL) {
			middleStr = middleStr2 + separator + middleStr1;
		}
		else {
			middleStr = middleStr1 + separator + middleStr2;
		}
	}
	
        //My Fix
	if (middleStr1 == middleStr2) {
			middleStr = middleStr1;
	}
        //End of fix

	return leftStr + middleStr + rightStr;
}

Nov 25, 2014
Project Member #1 adamrs...@gmail.com
I can confirm that this problem exists.
Summary: Duplicate week number in date range formatting text (was: Duplicate week number in header title)
Status: Accepted
Labels: Type-Bug
Mar 20, 2015
#2 MarvinBo...@gmail.com
The issue still exists. The proposed fix also looks good to me and works well. I would like to have it in a release.
May 12, 2015
#3 rene.spr...@gmail.com
I've created a different fix that uses the similarUnitMap that is already being used for defining where to split the dates.
The related PR can be found here: https://github.com/arshaw/fullcalendar/pull/231
Aug 21, 2015
Project Member #4 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/2636

This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event.

Happy coding,
Adam
Status: ExportedToGithub
Sign in to add a comment

Powered by Google Project Hosting