Skip to content
Advertisement

Create Array from Model Data in Django Template in

I am trying to use JQuery date picker and I want to make use of the beforeShowDay method in order to block out dates in the date picker. I have been able to get the widget to work and if I define an array, the beforeShowDay method works flawlessly. But my issue is passing the data from my Django model to create an array. Is there a way to create an array within the element in the template in order to achieve this?

template

JavaScript

Advertisement

Answer

Finally figured it out, hopefully helps someone in the future! Thanks Haduki for the help :)

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement