Current Date and Time Widget

The Singular Current Data and Time Widget is an advanced widget that allows you to create all sorts of digital and analog clocks.

The Widget uses Moment.js, a free and open source JavaScript library that removes the need to use the native JavaScript Date object directly.

The only way to really harness the power of the Current Date and Time Widget is to start here:

Moment.js is the key to the kingdom for unleashing the power of the Current Data and Time Widget, specifically the formatting of how yo want the data and time displayed,

For example if you enter this format into the Widget:

dddd, MMMM Do YYYY, h:mm:ss a

the result will be rendered as:

Monday, April 29th 20019, 3:27:55pm (but it will display s the actual time) 

To get started, you'll need to make a new composition in Singular, then add a Subcomposition to the tree and finally add the Current Date and Time Widget inside the Composition.

This is a "more advanced" Widget so it is dependent a dedicated Subcomposition.

Click the Edit button on the bottom of the Current Date and Time tab within the Property Panel.



This is where you build your clock, weather is be Analog or Digital

As you can see in the image below, the Current Date and Time Widget uses what we call Widget Nodes. All this means is that we've done more of the work for you in that all you have to do is connect the various Widget Nodes directly to widget properties in the Composition Tree



So in this case there's a Rectangle Widget in the Composition Tree which is named "MinutesHand" and the rotation variable (Z) is connected to "Minutes Angle" Widget Node. 



As with all Widgets that are dependent on their own Subcompositions,  you will need to go up to the level in the Composition Tree where the Current Date and Time Widget was added to actually see the fruits of your labor.

This example composition, called Time Widget Example, can be downloaded from the Resource section of the marketplace. 


Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.