Reputation: 189
Normal style of drop down view is at bottom after click,HOw can I set to upper place.plz Let me fix that. Here is my nomal datepicker in reactjs.
<DatePicker
selected={this.state.startDate}
onChange={this.handleDateChange}
/>
Upvotes: 2
Views: 4020
Reputation: 1723
Add prop for popperPlacement
, like this:
<DatePicker
...
popperPlacement="top-start"
>
React DatePicker does that automatically if there is not enough room for it on the bottom of the page, but this way you can "force" it.
See The source for additional placement options.
Upvotes: 6