Creating an auto datepicker in homepage through wordpress

I’ve problem about a calendar, wordpress and datepicker:

first, I’ve a site wordpress that a client, while writing an article, can set a date (with datepicker) in a field (thanks to plugin Advdance Custom Fields).

Read More

second, in homepage, I’ve a calendar, structured by th (table..etc..) but, thanks to jquery, I can change the month with arrow (classic calendar with an each month for page).

I would select ONE specific day and month, that my client have selected into an article, and add a class (where I can change color with css) through jquery.

how can I do it? Thank you.

I’ve did it:

if ($('.data_field_by_client:contains("01")').length) {
        $('td').find('a:contains("1")').addClass('cale_sel_red');
    } else if ($('.data_field_by_client:contains("02")').length) {
        $('td').find('a:contains("2")').addClass('cale_sel_red');
    }

but doesn’t work because it control something that have a number 0 and 1 in a “td” adding my class “.cale_sel_red”.

I hope that you understand

ps: sorry for my terrible english!

Francesco

Related posts

Leave a Reply