How to Highlight all Mondays in date type

Janaki Raman
Tera Contributor

Hi Everyone,
How to Highlight all Mondays in date type?

JanakiRaman_0-1702625246022.png

Need Monday to highlight in a different color 

4 REPLIES 4

Vaibhav127
Tera Guru

Hi @Janaki Raman ,

 

Try this code, create a widget with this code and add to your catalog item as a variable or add it in the SC catalog item widget.

 

$(document).ready(function() {
$(document).on("mouseover mouseenter",".bootstrap-datetimepicker-widget",function() {
$( "tr .day:nth-child(2)" ).css('background-color', 'red');
});
});

 

It will highlight all the Mondays as mouse enters the calendar popup. You can change the child number to highlight other days.

Hi @Vaibhav127

I have this requirement too 
I have created a widget with code under System UI 
now how can I add it to the catalog item as a variable or add it to the SC catalog item widget?
Can you please explain me briefly or step-by-step? 
Thanks in Advance.


Hi @mathumathi ,

 

  1. Create a new widget
  2. add the code in the client script,
  3. create new catalog variable of type custom
  4. add the widget in the type specifications tab

or

add the code in the client script of SC Catalog item widget

1.Created a new widget

JanakiRaman_1-1702634628724.png

2.created new catalog variable of type custom

JanakiRaman_2-1702634732759.png

3.Added the widget in the type specifications tab

JanakiRaman_3-1702634810168.png

 

 After completing all this steps i have tested in the  Service portal but that field is not visible

JanakiRaman_0-1702634518667.png

Am i missing something somewhere ?

Thanks in Advance.