Page 1 of 1

[ANGULAR] Can we hide the current time label, without hiding other time ranges

Posted: Mon Feb 06, 2023 9:10 am
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 306 times

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

Thanks in advance


Re: [ANGULAR] Can we hide the current time label, without hiding other time ranges

Posted: Mon Feb 06, 2023 11:59 am
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
}

Re: [ANGULAR] Can we hide the current time label, without hiding other time ranges

Posted: Tue Feb 07, 2023 12:44 am
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 273 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 273 times

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

Thanks in advance


Re: [ANGULAR] Can we hide the current time label, without hiding other time ranges

Posted: Tue Feb 07, 2023 7:47 am
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 257 times

Re: [ANGULAR] Can we hide the current time label, without hiding other time ranges

Posted: Wed Feb 08, 2023 2:03 am
by peterjc

Thanks for that! Got it working.