You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/03/23 12:07:29 UTC

[royale-asjs] branch feature/jewel-datefield-year-month updated: jewel-datechooser: fix reset of days when navigating months

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-datefield-year-month
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/jewel-datefield-year-month by this push:
     new c1d047e  jewel-datechooser: fix reset of days when navigating months
c1d047e is described below

commit c1d047e7e3084a7f1798a6f9cfa46f60b97ce9cf
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Mar 23 13:07:22 2019 +0100

    jewel-datechooser: fix reset of days when navigating months
---
 .../royale/org/apache/royale/jewel/beads/models/DateChooserModel.as    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/DateChooserModel.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/DateChooserModel.as
index 2ec18fd..6002281 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/DateChooserModel.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/DateChooserModel.as
@@ -68,7 +68,7 @@ package org.apache.royale.jewel.beads.models
         
 		private var _months:Array = [];
 		public static const NUM_DAYS_VIEW:int = 42;
-        private var _days:Array = new Array(NUM_DAYS_VIEW);
+        private var _days:Array;
 		public static const NUM_YEARS_VIEW:int = 24;
 		private var _years:Array = new Array(NUM_YEARS_VIEW);
 		
@@ -276,6 +276,7 @@ package org.apache.royale.jewel.beads.models
 			if(viewState == 0)
 			{
 				var firstDay:Date = new Date(displayedYear, displayedMonth, 1);
+				_days = new Array(NUM_DAYS_VIEW); // always reset the array to remove older values
 				// skip to the first day and renumber to the last day of the month
 				i = firstDay.getDay() - firstDayOfWeek;
 				var dayNumber:int = 1;