From 0fac4ac0adecd7f3f85c53e738f49b80f50ba389 Mon Sep 17 00:00:00 2001
From: SachaG <358832+SachaG@users.noreply.github.com>
Date: Sun, 11 Feb 2018 09:28:35 +0100
Subject: [PATCH] Dynamic viewDate

---
 DateTime.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/DateTime.js b/DateTime.js
index 1259287..6074e16 100644
--- a/DateTime.js
+++ b/DateTime.js
@@ -183,6 +183,10 @@
 				}
 			}
 		}
+
+		if ( nextProps.viewDate !== this.props.viewDate ) {
+			updatedState.viewDate = nextProps.viewDate;
+		}
 		//we should only show a valid date if we are provided a isValidDate function. Removed in 2.10.3
 		/*if (this.props.isValidDate) {
 			updatedState.viewDate = updatedState.viewDate || this.state.viewDate;

--
Gitblit v1.9.3