简体   繁体   English

如何更改反应日历中的 html?

[英]How to alter the html in the react-calendar?

I am designing a calendar modal, for which I have used the react-calendar npm package ( https://www.npmjs.com/package/react-calendar ), I am able to alter the CSS of the package by overwriting the calendar.css in the dist folder with a local copy, but I don't understand how can I alter the HTML of the package, I have to add a text on the very top and remove few navigational buttons from the navigation panel.我正在设计一个日历模式,为此我使用了 react-calendar npm 包( https://www.npmjs.com/package/react-calendar ),我可以通过覆盖日历来更改包的 CSS .css 在带有本地副本的 dist 文件夹中,但我不明白如何更改包的 HTML,我必须在最顶部添加一个文本并从导航面板中删除几个导航按钮。 Please refer to the pic below, for reference.请参考下图,以供参考。 1st pic: what I have done so far第一张图:到目前为止我做了什么

2nd pic: what I want to achive第二张图:我想达到什么

In the documentation their are few props mentioned amongst which use navigationLabel as show below;文档中,他们提到的道具很少,其中使用navigationLabel标签,如下所示;

<Calendar
 onChange={this.smallCalenderChange}
 value={this.state.date}
 navigationLabel={() => <p>Choose Date</p>}
/>

the navigationLabel props takes a component as an argument where you can specify the header for the calendar, in my case I have given the following:- () => <p>Choose Date</p>导航标签道具将一个组件作为参数,您可以在其中指定日历的标题,在我的情况下,我给出了以下内容:- () => <p>Choose Date</p>

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

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