Fix grid size calculation in javascript widget.

'get_month_grid' would incorrectly determine number of rows as it did not factor the start day-of-week for offset.