I'm trying to make a replica of the Google Calender repetition dialog, and I'm stuck, when I trying to figure out how to get jQuery datepicker to return the number of weekdays in a month, for example if I select a date and it's a Wednesday, I would like datepicker to tell me the number of Wednesdays in that month I've selected, for December 2012, if I select the 26. December it should return 4 or fourth.

Is that possible?