Hi All,
I am trying to disable dates on my datePicker using dates from a collection, but I can’t seem to convert all the dates in the collection to an array so the datePicker can read the dates. I am able to oull the dates using a query, but can’t get them to reflect as an array of dates.
Hi Camille,
The map function will put the results of a date field in an object array (resulting from a query) into an array of dates, like the following:
let dates = results.items.map(a => a.dateRegistered);
If you want to derive just the unique dates from a date field in a collection, there is the distinct function for that.
Thank you so much Anthony! Worked like a charm