我很难让react-datepicker在我的代码中缩小到它的父容器。我在这里找到了给它一个新样式表的建议,但我不确定为预制反应组件设置样式的推荐方法是什么。这是我的代码块:
<Card style={{height: '96%'}}>
<CardHeader>
Refine By:
</CardHeader>
<CardBody>
<h6>Release Date Range:</h6>
<Row>
<Col>
<div style={{paddingBottom: 10,width:'100%',display:'block',backgroundColor:'red'}}>
<DatesForm dateFilter={this.state.dateFilter} logDates={this.logDates}
type={'start'} updateTable={this.filterData} style={{width:'100%'}}/>
</div>
</Col>
<Col>
<div style={{paddingBottom: 20}}>
<DatesForm dateFilter={this.state.dateFilter} logDates={this.logDates}
type={'end'} updateTable={this.filterData}
style={{width:'100%'}}/>
</div>
</Col>
</Row>
</CardBody>
</Card>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>