Trying to set enabledDateRanges

I am trying to set the enabled dates on a date picker based on date records in a collection called “Bookings”

This is my code:

$w . onReady ( async function () {
const results = await wixData . query ( “Bookings” ). find ();
let availableDates = [];
results . items . forEach ( item => {
var aRange = { startDate : item . date , endDate : item . date };
availableDates . push ( aRange );
console . log ( item . date )

})
console . log ( ‘Set the dates"’ );
console . log ( availableDates );

$w ( ‘#requiredDate’ ). enabledDateRanges = availableDates ;
});

But it is failing to set the dates even though they are showing correctly in the debugger

I have the same issue. The push is not working. Any idea?