Okay, I’ve read multiple post with that contain problems with this error. . . But none of them solved mines. I followed this tutorial: https://support.wix.com/en/article/velo-formatting-dates
To the absolute best of my abilities, but the error keeps appearing. The code is literally nothing that’s not shown in the tutorial.
What I’m trying to do is to make the text on my schedule (I didn’t use any apps) change to match the users time.
I, also, wish—even though this may not be possible—to have a timezone drop down. Where the user selects their closest timezone and the site changes to match. Can someone help me solve this error first?
// API Reference: https://www.wix.com/velo/reference/api-overview/introduction
// “Hello, World!” Example: https://learn-code.wix.com/en/article/1-hello-world
$w.onReady(function () {
// Get the date from the date field of the current item
const date = $w("#text6").getCurrentItem().dateField;
// Set the text element to display the date using the user's settings
$w("#text6").text = date.toLocaleDateString()
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("#text6").text = today.toLocaleDateString("en-US", options);
// To select an element by ID use: $w("#elementID")
// Click "Preview" to run your code
});
/**
* Adds an event handler that runs when an input element's value
is changed.
* @param {$w.Event} event
*/
export function dropdown1_change(event) {
// This function was added from the Properties & Events panel. To learn more, visit http://wix.to/UcBnC-4
// Add your code for this event here:
}