Hello Kentico Team
i want to achieve that ,i want to make a loop inside the html to be able to have the result sperated not together for example the result comes like that
<div class="menu__api">Saturday, January 5, 2019, Sunday, January 6, 2019, Monday, January 7, 2019, Tuesday, January 8, 2019, Wednesday, January 9, 2019, Thursday, January 10, 2019</div>
and i want it like that
<div class="menu__api">Saturday, January 5, 2019</div> <div class="menu__api">Saturday, January 6, 2019</div>
here is my transformation :
Image
You will have to do that in your GetDates() function.
GetDates()
You can do something like:
allDates.Add("<div class='menu__api'>"+date.ToLongDateString() + "</div>");
then remove the ", " in your result.
", "
Thanks for sharing with us. One more thing I would like to share with you.
When giving new Date a string date, the string need to include the timezone, otherwise it will be interpreted differently from browser mcdvoice to other (due to different javascript implementations) and from machine to other (due the difference of the local time zone). thanks.
Please, sign in to be able to submit a new answer.