Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to style disabled antd picker

I need to apply a custom style to the disabled the antd range picker.

I have added className to the component but the style isn’t changing.

                        <RangePicker
                          className="my-range"
                          allowClear={false}
                          bordered={true}
                          format="HH:mm"
                          style={{ width: "100%" }}
                        />

Styles Css: (need to change color of the text in the box)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

.ant-picker-disabled.building-ophrs-range {
  background-color: #ffffff;
  .ant-picker-input.ant-picker-input-active {
    color: #224cc0;
  }
}

enter image description here

Codesandbox : https://codesandbox.io/s/basic-antd-4-20-7-forked-g5ee2t?file=/demo.js

>Solution :

try to write

.ant-picker-disabled.my-range {
  background-color: #008000 !important;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading