From e7b3f73d76b1e01d24cfbc49b3a672bf80fe53ee Mon Sep 17 00:00:00 2001 From: "donggua.lin" Date: Wed, 22 May 2019 21:46:44 +0800 Subject: [PATCH] =?UTF-8?q?controller.moveToCalendar=E6=97=A0=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/controller.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/controller.dart b/lib/controller.dart index a6abfb0..7919920 100644 --- a/lib/controller.dart +++ b/lib/controller.dart @@ -160,7 +160,7 @@ class CalendarController { {bool needAnimation = false, Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.ease}) { - DateModel dateModel = DateModel.fromDateTime(DateTime(year, month, day)); + DateModel dateModel = DateModel.fromDateTime(DateTime(year, month, 1)); //计算目标索引 int targetPage = monthList.indexOf(dateModel); if (targetPage == -1) {