Triggers: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 223: Line 223:


<source lang="javascript">
<source lang="javascript">
var m = moment().add(1,'d') // Using the moment.js library function moment(),
var m = moment().add(1,'d'); // Using the moment.js library function moment(),
                            // get the current time and add 1 day
                            // get the current time and add 1 day
m.hour(8).minute(0);       // Set the time to hour 8 and minute 0
m.hour(8).minute(0);         // Set the time to hour 8 and minute 0
entryDefault().set("Date",
entryDefault().set("Date",
     m.toDate().getTime()); // Use that as the default value for the field Date
     m.toDate().getTime());   // Use that as the default value for the field Date
</source>
</source>