Skip to content
Snippets Groups Projects
Commit 6d216eed authored by Damien's avatar Damien
Browse files

Change calendrier

parent 948a089a
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ class FormToucan extends Component { ...@@ -51,7 +51,7 @@ class FormToucan extends Component {
} }
onDateChange = (event,{value}) =>{ onDateChange = (event,{value}) =>{
let [day,month,year] = value.split("-") let [year,month,day] = value.split("-")
this.setState({dateShown: value, 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))});
} }
...@@ -70,7 +70,7 @@ class FormToucan extends Component { ...@@ -70,7 +70,7 @@ class FormToucan extends Component {
body: form body: form
}) })
.then((response) => { .then((response) => {
if (response.ok) { if (response.ok) { // Si la réponse est bonne on reload tout simplement
window.location.reload() window.location.reload()
} else { } else {
try { try {
...@@ -101,7 +101,6 @@ class FormToucan extends Component { ...@@ -101,7 +101,6 @@ class FormToucan extends Component {
<Form error={formError} onSubmit={this.onSubmit} > <Form error={formError} onSubmit={this.onSubmit} >
<Form.Group style={{margin:"auto"}}> <Form.Group style={{margin:"auto"}}>
<Form.Input <Form.Input
style={{height:"inherit"}}
type="text" type="text"
label="Thème Toucan" label="Thème Toucan"
placeholder="Thème" placeholder="Thème"
...@@ -112,12 +111,20 @@ class FormToucan extends Component { ...@@ -112,12 +111,20 @@ class FormToucan extends Component {
required required
/> />
<DateInput {/*<DateInput
style={{width:"10em",}} style={{width:"10em",}}
pickerStyle={{active:{backgroundColor:"red"}}} pickerStyle={{active:{backgroundColor:"red"}}}
hideMobileKeyboard hideMobileKeyboard
label="Date" label="Date"
localization="fr" localization="fr"
name="datheu"
onChange={this.onDateChange}
value={this.state.dateShown}
required
/>*/}
<Form.Input
type="date"
label="Date"
name="date" name="date"
onChange={this.onDateChange} onChange={this.onDateChange}
value={this.state.dateShown} value={this.state.dateShown}
...@@ -128,12 +135,12 @@ class FormToucan extends Component { ...@@ -128,12 +135,12 @@ class FormToucan extends Component {
<Form.Input <Form.Input
label="PDF du Toucan" label="PDF du Toucan"
onChange={this.onFileChange} onChange={this.onFileChange}
style={{width:"20em"}}
name="toucan" name="toucan"
accept="application/pdf" accept="application/pdf"
type="file" type="file"
required required
/> />
<Form.Input <Form.Input
label="Cover du Toucan" label="Cover du Toucan"
onChange={this.onFileChange} onChange={this.onFileChange}
...@@ -151,7 +158,6 @@ class FormToucan extends Component { ...@@ -151,7 +158,6 @@ class FormToucan extends Component {
</ul> </ul>
} /> } />
</Form> </Form>
{console.log(this.state.responseMessage)}
{this.state.responseMessage ? {this.state.responseMessage ?
<Message negative header="Erreur Serveur" content={this.state.responseMessage}></Message>: null} <Message negative header="Erreur Serveur" content={this.state.responseMessage}></Message>: null}
</div> </div>
......
...@@ -24,7 +24,7 @@ class ToucanTable extends Component{ ...@@ -24,7 +24,7 @@ class ToucanTable extends Component{
render() { render() {
return( return(
<Table celled padded collapsing size="small" textAlign="center"> <Table style={{margin:"auto"}} celled padded collapsing size="small" textAlign="center">
<Table.Header> <Table.Header>
<Table.Row> <Table.Row>
<Table.HeaderCell>Cover</Table.HeaderCell> <Table.HeaderCell>Cover</Table.HeaderCell>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment