$('<option></option>')
.attr('label', day)
.attr('value', day)
if(myDate.getDate() == day)
{
.attr('selected','selected')
}
.html(day)
.appendTo(daySelector);
What I want to do is run an if statement and if it is true make that day selected.
You can use an object to accomplish this:
$('<option />', {
selected: myDate.getDate() === day,
value: day,
text: day
}).appendTo(daySelector)
Here is an example of that style: http://jsfiddle.net/9hVeq/