| Issue 2371: | Duplicate week number in date range formatting text | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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; }
Mar 20, 2015
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
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
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 |
Status: Accepted
Labels: Type-Bug