I have a repeater connected to a dataset on my site that I am updating text using code (I’m updating a date field but as text).
$w('#dataset1').onReady(() => {
$w('#myrepeater').onItemReady(($item, itemdata) => {
let eventDate = new Date(itemdata.date);
eventDate.setHours(0,0,0,0);
$item('#eventDate').text = eventDate.toLocaleDateString("en-GB", {weekday: 'short', year: "numeric", month: "long", day: "numeric" });
...
This code works on first run and I’m able to get the full date String (e.g. “Mon, 4 March 2024”)
At the bottom of my page, I am using a viewportEnter on a column strip to call loadMore() to load more items in my dataset.
However, after calling loadMore(), my $item(‘#eventDate’).text doesnt update on the site even though I can see the dates update when I print in the console log.
Any help would be appreciated.
Edit: Fixed! All I had to do was disconnect the text from the dataset because I had already connected it via code.