简体   繁体   English

如何使用react-dates进行CSS样式设置?

[英]How to CSS styling with react-dates?

I'm using a react-dates package of Airbnb, but I can't styling CSS for it. 我正在使用Airbnb的react-dates包,但无法为此设计CSS样式。 So, if you used it, please help me. 因此,如果您使用过它,请帮助我。 How to styling CSS for react-dates? 如何设置CSS的react-dates样式?

在此处输入图片说明 "actual" “实际”

I expect the date picker will be 我希望日期选择器会

在此处输入图片说明

react-dates relies on moment to format date. react-dates取决于格式化日期的时刻。 If what you need is just show a complete date, you need to format your date using the displayFormat prop, like this example: 如果只需要显示一个完整的日期,则需要使用displayFormat属性格式化日期,例如以下示例:

 static defaultProps = {
    Wrapper: styles.Wrapper,
    displayFormat: 'MMM DD YYYY',
    invalid: false,
    disabled: false,
  };

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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