biggner needs help in dates

@amandam & @volkaertskristof
const currentdate = d . toLocaleDateString ( ‘en-US’ )
this line solve it thanks for both of you guys

but when amanda said try the published version , there it is another problem.

the code now is running smoothly , but only in preview mode and dose not work in the published site
(what i meant by dose not work that when i go to the collection there is no data have been inserted)

can any one tell why ?