Right now, I have this on my page:
<script type="text/javascript">
$(document).ready(function () {
var days = [
{ Date: new Date($('#hfEventStartDate').val()) },
{ Date: new Date($('#hfEventEndDate').val()) }
];
});
</script>
<asp:HiddenField ID="hfEventStartDate" runat="server" />
<asp:HiddenField ID="hfEventEndDate" runat="server" />
I’m setting hfEventStartDate and hfEventEndDate when the page loads. With my code right now, it creates an array with two values: the start date and the end date. But I’d like to also have the array contain all the dates in between. How can I do that?
You could make use of
setDate(getDate() + 1)to ‘iterate’ over all days: http://jsfiddle.net/pimvdb/4GeFD/1/.