简体   繁体   中英

Ant Design's Time Picker color

Is there an easy and quick way to modify these colors?

Thanks in advance

在此处输入图像描述

By the documentation from Ant Design,

popupStyle | The style of panel | CSSProperties

you could use popupStyle as a prop and just use normal CSS to style timepicker.

or

you could use popupClassName , popupClassName={classes.timepicker}

timepicker: {
    "& .ant-picker-footer": {
        color: "#your color",
    },
}

you could find the correct className in dev tools.

Edit:

  1. Here is a simple method with the use of className .
  className="timepicker-background"

and in CSS we have,

.timepicker-background {
  background-color: rgb(26, 25, 29);
  border-color: rgb(247, 30, 30);
}
  1. Here is another method with the use of popupStyles
  popupStyle={{ fontSize: 30 }}

在此处输入图像描述

Demo in Codesandbox

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM