Premium support for our pure JavaScript UI components


Post by peterjc »

Hi, I have previously hidden time range labels using

/** Hide the labels on the time lines  */
  .b-grid-header .b-sch-timerange.b-sch-line {
    display: none;
  }

However, I would now like to show them, but when I remove the above, it also show the label for the current time.

Is there a way of hiding just the current time label?

currentime.png
currentime.png (25.88 KiB) Viewed 216 times

Looking in dev tools I can see no special attributes on it to target in css?

Thanks in advance


Post by tasnim »

Hello,

To hide the current timeline label you could set showCurrentTimeLine to false
Please check docs here https://bryntum.com/products/scheduler/docs/api/Scheduler/feature/TimeRanges#config-showCurrentTimeLine

Here is an example

timeRanges : {
	showCurrentTimeLine : false
}

Post by peterjc »

Hi thanks for that.

I actually did want to keep the line, but not the annoying label that sits on top of my other labels....

2023-02-07_06-38-39.png
2023-02-07_06-38-39.png (36.94 KiB) Viewed 183 times

I did forget that I was already targeting the class, so I have tried everything in here....

.b-sch-current-time {  
//background-color: transparent !important;
border-width: 0 !important; border-left: 1px orange !important; border-style: solid !important; opacity: 1; //height: 0 !important; label { height: 0 !important; width: 0 !important; border-width: 0 !important; } }

No matter what I do, I cannot get rid of that label.

And its even worse when the current time is near the beginning of one of my other time lines, eg

2023-02-07_06-41-54.png
2023-02-07_06-41-54.png (4.27 KiB) Viewed 183 times

If I could just get rid of the "rectangle top bit", but keep just the line, that would be great.

Thanks in advance


Post by tasnim »

Hello,

You could use this CSS to achieve this

.b-grid-header.b-sch-timeaxiscolumn-levels-2 .b-sch-timerange[data-id="currentTime"] {
    display: none;
}

Here is the output

Screenshot 2023-02-07 114655.png
Screenshot 2023-02-07 114655.png (13.06 KiB) Viewed 167 times

Post by peterjc »

Thanks for that! Got it working.


Post Reply