From 9ed66b8000bf6c3708e85d62c54d8ca1a097a2d3 Mon Sep 17 00:00:00 2001
From: Damien <damien.armillon@gmail.com>
Date: Sun, 5 May 2019 13:22:15 +0200
Subject: [PATCH] Enleve quelques warning

---
 front/src/FormToucan.js | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/front/src/FormToucan.js b/front/src/FormToucan.js
index a5442ce..3db9980 100644
--- a/front/src/FormToucan.js
+++ b/front/src/FormToucan.js
@@ -10,14 +10,15 @@ class FormToucan extends Component {
     constructor(props) {
         super(props)
         this.state = {
-            title: null,
+            title: "",
             titleError: false,
 
-            toucan: null,
+            toucan: undefined,
 
-            cover: null,
+            cover: undefined,
 
-            date: null,
+            dateShown:"",
+            date: undefined,
         }
     }
 
@@ -49,7 +50,7 @@ class FormToucan extends Component {
 
     onDateChange = (event,{value}) =>{ 
         let [day,month,year] = value.split("-")
-        this.setState({date: new Date(Date.UTC(year,month-1,day,0,0,0))});
+        this.setState({dateShown: value, date: new Date(Date.UTC(year,month-1,day,0,0,0))});
     }
 
     onSubmit = () => {
@@ -111,7 +112,7 @@ class FormToucan extends Component {
                     localization="fr"
                     name="date"
                     onChange={this.onDateChange}
-                    value={this.state.date}
+                    value={this.state.dateShown}
                     //required
                 />
 
-- 
GitLab