Separate date text entry and combine

Dec 28, 2019

I'm using SL3 and wanted to do a date appointment for my client. My client will key in the date by day, month and year and an email will be sent to me in the format of day / month / year. 

I have found an old article with the JavaScript  on how to do the format I wanted as attached "concatenate+name (1)"

I have followed the same JavaScript with modification to my requirement as attached in "calander test"

It seem like I can't get the format I wanted.

What went wrong, please help.


3 Replies
Phil Mayor

In the calendar test you have a few errors in your code, I didn't see the need for two different variables for the date

var player = GetPlayer(); var dd = player.GetVar("dd"); var mm = player.GetVar("mm"); var yyyy = player.GetVar("yyyy"); var ApointD = dd + ' ' + mm + ' ' + yyyy; player.SetVar("ApptDate", ApointD);

Your player had a capital letter, missing a space in the SetVar.

This discussion is closed. You can start a new discussion or contact Articulate Support.