简体   繁体   English

css class 名称在 react-big-calendar 中的含义 [与 Selenium 一起使用]

[英]css class names meaning in react-big-calendar [using it with Selenium]

I'm using selenium in javascript over a page that has the react-big-calendar plugin;我在具有react-big-calendar插件的页面上使用 javascript 中的 selenium;

since I'm trying to do several selects and choosing the right day (today, the day current selected, the month current displaying, etc.) I'm trying to figure out some css-classes meaning:因为我正在尝试进行几次选择并选择正确的日期(今天,当前选择的日期,当前显示的月份等)我试图找出一些 css 类的含义:

  • the rbc-now class i thought it was the current day but it's not, since if i select an appointment this class has been applied to it too; rbc rbc-now class 我以为是今天,但事实并非如此,因为如果我 select 预约了此 class 也已应用于它;
  • the rbc-current class is applied to ALL the day numbers like today, eg if today is the 18th day of the month, all the 18th of jan.,feb.,mar.,... have this class applied (is it right?) rbc rbc-current class 适用于像今天这样的所有日期,例如,如果今天是本月的第 18 天,则在 1 月 18 日、2 月、3 月 18 日……应用此 class ?)
  • the rbc-today class which I couldn't figure out what is. rbc rbc-today class 我不知道是什么。

I tried to search also in reactiflux discord like suggested in the last row of the above link but with no clue.我也尝试在 reactiflux discord 中进行搜索,就像上面链接的最后一行中建议的那样,但没有任何线索。

Does anyone knows what exactly indicates those classes?有谁知道这些类的确切含义是什么?

Ok, i think I've managed it.好的,我想我已经成功了。 I'll take as example the monthly view.我将以月视图为例。

  • rbc-today : is the class used for the big div that corresponds to the first nearest appointment happening from today : this class gives the pale blue color to the day. rbc-today : 是用于大div的 class 对应于今天发生的第一个最近的约会:这个 class 为当天提供了淡蓝色 It is assigned to a div that already has rbc-day-bg class:它被分配给已经有rbc-day-bg class 的div
    <div class="rbc-month-row">
        <div rbc-row-bg>
            <div class="rbc-day-bg"></div>
            <div class="rbc-day-bg"></div>
            [...]
            <div class="rbc-day-bg rbc-today"></div>    <---HERE
        </div>
    </div>

This div block represents the entire day.这个 div 块代表一整天。

  • rbc-now : this class put bold to the day number of the month (eg 28). rbc-now :此 class 将粗体显示为月份的天数(例如 28)。 Indicates the number of the month of the first nearest appointment happening from today .表示从今天开始发生的第一个最近约会的月份数 It is assigned to divs that already have an rbc-date-cell class and they are in the first rbc-row class under rbc-row-content :它被分配给已经有一个rbc-date-cell class 的 div,它们位于 rbc rbc-row-content下的第一个 rbc rbc-row class 中:
    <div class="rbc-month-row">
        <div rbc-row-bg>
            <div class="rbc-day-bg"></div>
            <div class="rbc-day-bg"></div>
            [...]
            <div class="rbc-day-bg rbc-today"></div>    
        </div>

        <div class="rbc-row-content">
            <div class="rbc-row ">
                <div class="rbc-date-cell">
                    <a href="#">26</a>
                </div>
                <div class="rbc-date-cell">
                    <a href="#">27</a>
                </div>
                <div class="rbc-date-cell rbc-now">    <---HERE
                    <a href="#">28</a>
                </div>
            </div>
        </div>
    </div>
  • rbc-current : gives no style , acts exactly as rbc-now , but is assigned to every single number of the day of the month which is equal to the day of the month of the appointment , from that day onwards: eg if you put an appointment to march,28,2021, rbc-current will be applied to 28 of april, 28th may, 28th june...etc, but also 28 of jan 2022, 28 feb 2022...etc. rbc-current :不给出任何样式,与rbc-now完全一样,但从那天开始,分配给与约会当月日期相等的月份中的每个日期:例如,如果你放预约到 2021 年 3 月 28 日,rbc rbc-current将适用于 4 月 28 日、5 月 28 日、6 月 28 日...等,但也适用于 2022 年 1 月 28 日、2022 年 2 月 28 日...等。
<div class="rbc-month-row">
        <div rbc-row-bg>
            <div class="rbc-day-bg"></div>
            <div class="rbc-day-bg"></div>
            [...]
            <div class="rbc-day-bg rbc-today"></div>
        </div>

        <div class="rbc-row-content">
            <div class="rbc-row ">
                <div class="rbc-date-cell">
                    <a href="#">26</a>
                </div>
                <div class="rbc-date-cell">
                    <a href="#">27</a>
                </div>
                <div class="rbc-date-cell rbc-now rbc-current">    <---HERE
                    <a href="#">28</a>
                </div>
            </div>
        </div>
    </div>

Hope this will be useful for future reference.希望这对将来的参考有用。

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

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