- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017 09:11 AM
Hi All,
In Service Portal, we have "Cool clock" widget to display Analog Clock.
Did anyone tried on creating "Digital clock", according to different time zone??
Please help me to know....Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 06:50 AM
so if all you want is a really simple digital clock, you can just add some code like the following to your clock widget, or create a clone of the clock widget
since the clock widget already creates a variable called c.date we can just use that to display our clock
HTML
<p id="time">
{{c.date.hours()}}:{{c.date.minutes()}}:{{c.date.seconds()}}
</p>
CSS
#time {
font-family: fantasy;
font-size:20px;
color:silver;
border:2px solid #2E9AFE;
padding:10px;
text-align: center;
width: 200px;
}
Results in this output for the clock
you can make the clock look/feel prettier by adjusting the CSS to meet your needs
hope that helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 11:50 PM
Thanks Ayush, I got it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 03:31 AM
Can i get the server and client code for the same, facing some issues related to it while updating the time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 06:50 AM
so if all you want is a really simple digital clock, you can just add some code like the following to your clock widget, or create a clone of the clock widget
since the clock widget already creates a variable called c.date we can just use that to display our clock
HTML
<p id="time">
{{c.date.hours()}}:{{c.date.minutes()}}:{{c.date.seconds()}}
</p>
CSS
#time {
font-family: fantasy;
font-size:20px;
color:silver;
border:2px solid #2E9AFE;
padding:10px;
text-align: center;
width: 200px;
}
Results in this output for the clock
you can make the clock look/feel prettier by adjusting the CSS to meet your needs
hope that helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2017 09:32 AM
Thanks Robert..
It is working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2018 08:14 PM
Is there a way to make the minutes double digits when under 10 (i.e. 0-9)?
Currently if the time is for example 13:08:40, it is displayed as 13:8:40.