Skip to content

Commit 7de1844

Browse files
authored
fix(b-calendar): month formatting for ceratin dates (#5911)
1 parent 955ad63 commit 7de1844

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/calendar/calendar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,10 @@ export const BCalendar = Vue.extend({
356356
return this.activeDate.getMonth()
357357
},
358358
calendarFirstDay() {
359-
return createDate(this.calendarYear, this.calendarMonth, 1)
359+
// We set the time for this date to 12pm to work around
360+
// date formatting issues in Firefox and Safari
361+
// See: https://github.com/bootstrap-vue/bootstrap-vue/issues/5818
362+
return createDate(this.calendarYear, this.calendarMonth, 1, 12)
360363
},
361364
calendarDaysInMonth() {
362365
// We create a new date as to not mutate the original

0 commit comments

Comments
 (0)