Search code examples
htmlreactjsinputreactstrap

ReactStrap: Display default value in Input of type date


I have this date Input:
enter image description here
I am trying to display a default value:

<Input value="2017-06-01" type="date" />

But, as you see above, it doesn't get displayed.
I have followed the Mozilla documentation:

You can set a default value for the input with a date inside the value attribute, like so:

<input type="date" value="2017-06-01">

Solution

  • Try to use defaultValue props

    <Input defaultValue="2017-06-01" type="date" />