diff --git a/06-interagir-avec-le-terminal/ReactBnb/src/containers/SearchForm.js b/06-interagir-avec-le-terminal/ReactBnb/src/containers/SearchForm.js index cb80c9b..ece6006 100644 --- a/06-interagir-avec-le-terminal/ReactBnb/src/containers/SearchForm.js +++ b/06-interagir-avec-le-terminal/ReactBnb/src/containers/SearchForm.js @@ -14,7 +14,8 @@ const CityInput = props => { } const DateInput = props => { - const { input, ...inputProps } = props; + const { input, ...inputProps } = props; + debugger; return { @@ -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()} />; } diff --git a/07-usages-avances/ReactBnb/src/containers/SearchForm.js b/07-usages-avances/ReactBnb/src/containers/SearchForm.js index 9323b16..eed06c6 100644 --- a/07-usages-avances/ReactBnb/src/containers/SearchForm.js +++ b/07-usages-avances/ReactBnb/src/containers/SearchForm.js @@ -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()} />; } diff --git a/07-usages-avances/correction/ReactBnb/src/containers/SearchForm.js b/07-usages-avances/correction/ReactBnb/src/containers/SearchForm.js index e9ae96c..da476fa 100644 --- a/07-usages-avances/correction/ReactBnb/src/containers/SearchForm.js +++ b/07-usages-avances/correction/ReactBnb/src/containers/SearchForm.js @@ -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()} />; }