From 699fc7e4004a5e29a79c27cdcc15c63f23aa597d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 16 Oct 2020 08:56:21 +0200 Subject: [PATCH] fix(b-calendar): month formatting for ceratin dates --- src/components/calendar/calendar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/calendar/calendar.js b/src/components/calendar/calendar.js index 1cec00454ce..52e691f183c 100644 --- a/src/components/calendar/calendar.js +++ b/src/components/calendar/calendar.js @@ -356,7 +356,10 @@ export const BCalendar = Vue.extend({ return this.activeDate.getMonth() }, calendarFirstDay() { - return createDate(this.calendarYear, this.calendarMonth, 1) + // We set the time for this date to 12pm to work around + // date formatting issues in Firefox and Safari + // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/5818 + return createDate(this.calendarYear, this.calendarMonth, 1, 12) }, calendarDaysInMonth() { // We create a new date as to not mutate the original