react-datepicker input width will not adjust to 100%

前端 未结 8 2050
谎友^
谎友^ 2021-02-14 00:16

I am attempting to adjust the width of the react-datepicker input box and surprisingly have found little information out there and am unable to effect its width. I would just l

8条回答
  •  你的背包
    2021-02-14 00:43

    Using styled-components

    import styled from 'styled-components';
    const DatePickerStyled = styled.div`
      /* STYLE FOR WITH */
      .react-datepicker-wrapper {
        width: 100%;
      }
    `;
    

    encloses the component

    
      
    
    

提交回复
热议问题