im following this tutorial:
to display date time on my page, but it is not working, what i got:
// Gets today's date
const date = $w("#dataset1").getCurrentItem().date;
const options = {
day: "numeric",
month: "short",
year: "numeric"
};
// Sets the property of the text element to be a string representing today's date in US English
$w("#text2").text = date.toLocaleDateString("en-US", options);
but my text2 field is not displaying the date