Skip to content

Commit

Permalink
06 : maj searchform : bug date.toLocaleDateString() : cf. facebook/re…
Browse files Browse the repository at this point in the history
  • Loading branch information
t-fritsch committed Jan 8, 2019
1 parent 52a7f42 commit 97559c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const CityInput = props => {
}

const DateInput = props => {
const { input, ...inputProps } = props;
const { input, ...inputProps } = props;
debugger;
return <TextInput
placeholder={inputProps.placeholder}
onFocus={() => {
Expand All @@ -29,7 +30,7 @@ const DateInput = props => {
}}
style={styles.input}
{...inputProps}
value={props.input.value && props.input.value.toLocaleDateString('fr-FR')}
value={props.input.value && props.input.value.toDateString()}
/>;
}

Expand Down
2 changes: 1 addition & 1 deletion 07-usages-avances/ReactBnb/src/containers/SearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const DateInput = props => {
}}
style={styles.input}
{...inputProps}
value={props.input.value && props.input.value.toLocaleDateString('fr-FR')}
value={props.input.value && props.input.value.toDateString()}
/>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DateInput = props => {
}}
style={styles.input}
{...inputProps}
value={props.input.value && props.input.value.toLocaleDateString('fr-FR')}
value={props.input.value && props.input.value.toDateString()}
/>;
}

Expand Down

0 comments on commit 97559c1

Please sign in to comment.