Quiz Slide - Enter Today's Date
Mar 10, 2016
Hi Everyone,
I'm currently building a scenario based quiz that mirrors a user filling out a bank loan application for a client. On one of the related quiz slides, I will require the learner to enter today's date. How can I get this to work? I've tried setting up a couple of variables and off slide buttons but can't get it to work. Any help you rock-stars out there can provide me would be very much appreciated.
Thanks
Al
4 Replies
Hi Al
I made couple of tweaks in your javascript code and renamed the variables to match the code. This thread with video tutorial was helpful:
https://www.articulate.com/support/storyline/javascript-best-practices-and-examples
Also the format which the date should be typed in is very important so you have to tell the users how they need to insert a date. See Storyline file attached.
Hi Joanna,
I went through the changes you made, deleting the extra variables I had created, and I really understand it now. I want to thank you very much!
Is there a change I can make to the js to make the month 2 digits (03/10/2016)? I tried changing var month to + 2 but it advanced the month to April, so I set it back.
Here's that code again.
I am very happy that the quiz slide works now, but I'm concerned that my learners will enter the full date and get the answer wrong. As below...
Thanks again ;-)
Al
Hi Al
you may want to check this thread form javascript experts:
http://stackoverflow.com/questions/2878184/get-month-in-mm-format-in-javascript
Hi, Al -- thanks for reaching out! In addition to assistance Joanna is providing you here, I thought you might also want to take a look at a few other threads on the topic of adding dates that may be of some interest:
Time & Date Variables in Storyline
Update a variable with the current date and time
Date Variables Available?
Setting variable to adjust dates in Storyline
Hopefully that helps, or perhaps others will be able to share additional ideas to assist, as well. :)
This discussion is closed. You can start a new discussion or contact Articulate Support.