javascript - 将自定义 CSS 样式添加到 Material UI KeyboardDatePicker

标签 javascript css reactjs material-ui

I'm using the Material UI KeyboardDatePicker. This is how the datepicker currently looks like

I want to get rid of that black line which is there in the datepicker as you can see in the screenshot. How do I do that?

This is the code of my datepicker.

<KeyboardDatePicker
    error={this.state.quickRegFormErrors["dob"]||this.state.quickRegFormErrors["form_dob"] }
    helperText={(this.state.quickRegFormErrors["dob"] && "Date Of Birth is Required") || (this.state.quickRegFormErrors["form_dob"]) }
    required 
    id="dob" 
    name="dob" 
    style={{width:"80%", marginTop:"15px"}} 
    clearable
    value={this.state.dob}
    placeholder="dd/mm/yyyy"
    onChange={this.dateOnChange}
    format="dd/MM/yyyy"
    disableFuture= {true}
    autoOk={true}
    className="quick-reg-datepicker"
/>

最佳答案

您可以在自定义 css 文件中删除该行。

 .quick-reg-datepicker .MuiInput-underline:before {
     content: none !important;
 }
 .quick-reg-datepicker .MuiInput-underline:after{
    content: none !important;
 }

关于javascript - 将自定义 CSS 样式添加到 Material UI KeyboardDatePicker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66459064/

相关文章:

jquery - zindex + jquery : How to make my menu appear over the jquery script?

javascript - React,处理来自组件的模态

reactjs - 将关键帧动画添加到 material-ui 样式的组件。 react

javascript - 使用 jQuery 从列表中按索引选择元素

javascript - 如何用一个常量乘以每个对象值数组?

javascript - typescript 可以推断参数已经被验证吗?

reactjs - 是否可以仅使用 React 发送邮件?

javascript - ESLint 规则阻止用户禁用 ESLint 规则

html - Bootstrap Glyphicons 在数据切换折叠时旋转

html - 连续 2 列,百分比宽度