Skip to content

Commit ec510c8

Browse files
authored
fix(calendar): evenly divide cell widths
The calendar columns are not evenly divided, which this PR fixes by adding the column count classnames to the calendars table. This is especially visible when using an inline calendar: Monday and Wednesday are much wider than the other columns.
1 parent 0905ccf commit ec510c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/definitions/modules/calendar.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ $.fn.calendar = function(parameters) {
4242
'15': {'row': 2, 'column': 2 },
4343
'20': {'row': 3, 'column': 1 },
4444
'30': {'row': 2, 'column': 1 }
45-
}
45+
},
46+
numberText = ['','one','two','three','four','five','six','seven','eight']
4647
;
4748

4849
$allModules
@@ -279,7 +280,7 @@ $.fn.calendar = function(parameters) {
279280
if (isDay && settings.showWeekNumbers){
280281
tempMode += ' andweek';
281282
}
282-
var table = $('<table/>').addClass(className.table).addClass(tempMode).appendTo(container);
283+
var table = $('<table/>').addClass(className.table).addClass(tempMode).addClass(numberText[columns] + ' column').appendTo(container);
283284
var textColumns = columns;
284285
//no header for time-only mode
285286
if (!isTimeOnly) {

0 commit comments

Comments
 (0)