I need to show inside a calendar the dates that are not available.
I have a queryset that return the unavailable Dates.
#views.py
rental_reservations = RentalReservation.objects.filter(post=post_id)
#models.py
class RentalReservation(TimeStampedModel):
post = models.ForeignKey('posts.Post', verbose_name="Condo Number")
start_date = models.DateField()
end_date = models.DateField()
But I can't figure out how to convert the queryset result into the jquery plugin that is looking for the following array:
var unavailableDates = [
{start: '2015-09-11', end: '2015-09-15'},
{start: '2015-09-15', end: '2015-09-23'},
{start: '2015-10-01', end: '2015-10-07'}
];