Good day everyone.
I tried to find the answer, but most of options which I found use JQuery. Unfortunately I can't use it in this specific task, only HTML + pure JS.
I have 2 date-inputs and the "Submit" button below, which must be disabled if one of inputs (or both) is empty.
<form action={"someaction"} method="post">
<Row>
<Col xs={4}><b>Start date of the period</b></Col>
<Col xs={6}>
<form name="dateFrom">
<input className="form-control" id="dateFrom" name="reportFrom" type="date" />
</form>
</Col>
</Row>
<br/>
<Row>
<Col xs={4}><b>End date of the period</b></Col>
<Col xs={6}>
<form name="dateTo">
<input className="form-control" id = "dateTo" name="reportTo" type="date" />
</form>
</Col>
</Row>
<br/>
<Row>
<Col xs={1}/>
<Col xs={5}><input className="btn btn-primary" type="submit" value="Submit data"/></Col>
//THIS SUBMIT BUTTON MUST BE DISABLED IF "dateFrom" OR
//"dateTo" IS EMPTY
</Row>
</form>
How can this be achieved?
Thank you in advance for your cooperation