Datepicker - iterating through each date

Datepicker - iterating through each date

Hi all,

I have an application which replicates the dates in the datepicker in a separate table and adds additional data to each td's contents.

I am trying to iterate through each cell in the datepicker and can get the following:

$(".ui-datepicker-calendar tbody td").each(function(index)

but how would I get the first date displayed in the calendar?  For instance, the first date displayed in January 2013 is Sunday Dec 30, 2012.  Once I have the first date I assume I can iterate through and create the td's I need in the new table assigning td ID's = to each date.

Any ideas?

Thanks.