From 842e88f115e3f328034d48a4dbbb59f21c8b049b Mon Sep 17 00:00:00 2001 From: xinde Date: Wed, 7 Sep 2022 22:57:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(Calendar):=20getDay=20=E5=92=8C=20getUTCDay?= =?UTF-8?q?=20=E6=9C=89=E6=97=B6=E9=97=B4=E5=B7=AE=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=98=9F=E6=9C=9F=E9=94=99=E4=BD=8D=20(#4883)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/youzan/vant-weapp/issues/4756 --- lib/calendar/components/month/index.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/calendar/components/month/index.wxs b/lib/calendar/components/month/index.wxs index 55e45a57..8c1e89b9 100644 --- a/lib/calendar/components/month/index.wxs +++ b/lib/calendar/components/month/index.wxs @@ -9,7 +9,7 @@ var ROW_HEIGHT = 64; function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) { var style = []; - var current = getDate(date).getDay() || 7; + var current = getDate(date).getUTCDay() || 7; var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) : current === 7 && firstDayOfWeek === 0 ? 0 : (current - firstDayOfWeek);