Forum Discussion
DonnaWestwood
8 years agoCommunity Member
Javascript date format dd/mm/yy NOT dd/mm/yyyy - do I need to import a library?
I am developing a software simulation which uses dates/ calendars extensively. (a booking system) Some javascript has already been used in this project, for example system date, year, month, day of ...
Vikaslalwani
4 years agoCommunity Member
You can also use moment.js which makes things easier.// set current value in textbox with id CurrentDate, using moment.js
Reference
$("#CurrentDate").val( moment().format('MM D, YY') );
Thanks
- MathNotermans-94 years agoCommunity Member
Although Vikas idea to simplify getting the current Date is usefull, when anyone is trying this, do remember 2 things.
Anywhere you see $ - signs in Javascript code, jQuery is used. And as this isnot available by default in Storyline, you will have to add the jQuery library to your Storyline. As the same is true for MomentJS. As this also is a separate JS library you need to add it to get working.