SingleDatePicker: Can't Set Input Width to 100% of Container
See original GitHub issueHi,
I’m using the SingleDatePicker component and need to have the input stretch to 100% of the width of the container my form is in (which is a fluid container, so I can’t use a px/em-based value). The sass variable that appears designed for setting the input’s width, $react-dates-width-input
, doesn’t seem to cover this case, because the .DateInput
is inside a .SingleDatePicker
, which has display: inline-block
. Setting the variable to 100%
gives the .DateInput
a width of 100%
, but that’s not 100% of the .SingleDatePicker
’s container, due to the inline-block
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:6
Top Results From Across the Web
SingleDatePicker: Can't Set Input Width to 100% of Container
Hi, I'm using the SingleDatePicker component and need to have the input stretch to 100% of the width of the container my form...
Read more >react-datepicker input width will not adjust to 100%
I would just like to make the input width 100% of its containing div. Expected behavior. The width should expand to the width...
Read more >React custom datepicker: Step-by-step - LogRocket Blog
Set up a robust and attractive datepicker in React that acts as an alternative to the native HTML5 datepicker input element.
Read more >Date Range Picker for Bootstrap
The Date Range Picker is attached to a text input. It will use the current value of the input to initialize, and update...
Read more >Datepicker font control - Dash Python - Plotly Community Forum
You may be able to do this by setting the font-size of the parent component with something ... How can the input date...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kimfucious I was able to fix the
showDefaultInputIcon={true}
andblock
bug by overriding the css (below is sass, so adjust accordingly):This is now very easy in v15.3.0 by just setting the
block
prop on the SDP or the DRP 😃