From ea20d344edafd3a7b3eee7b032d17dbbdabb4e08 Mon Sep 17 00:00:00 2001 From: David Martin Date: Fri, 8 Oct 2021 11:50:32 +0800 Subject: [PATCH] Reset Today as Open If the module is in an open app over several days the $scope.today is not reset to reflect the correct current date --- src/ionic-datepicker.provider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ionic-datepicker.provider.js b/src/ionic-datepicker.provider.js index 43ecd7b0..2442f3a2 100644 --- a/src/ionic-datepicker.provider.js +++ b/src/ionic-datepicker.provider.js @@ -230,7 +230,7 @@ angular.module('ionic-datepicker.provider', []) var buttons = []; delete $scope.fromDate; delete $scope.toDate; - + $scope.today = resetHMSM(new Date()).getTime(); $scope.mainObj = angular.extend({}, config, ipObj); if ($scope.mainObj.from) { $scope.fromDate = resetHMSM(new Date($scope.mainObj.from)).getTime();