Fix undefined items in dates API