Skip to content

Commit

Permalink
fix(calendar): evenly divide cell widths
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lubber-de authored Jul 13, 2020
1 parent 0905ccf commit ec510c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/definitions/modules/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ $.fn.calendar = function(parameters) {
'15': {'row': 2, 'column': 2 },
'20': {'row': 3, 'column': 1 },
'30': {'row': 2, 'column': 1 }
}
},
numberText = ['','one','two','three','four','five','six','seven','eight']
;

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

0 comments on commit ec510c8

Please sign in to comment.