Thank you very much @
kbwood.au. However, I would like to put each phase into a classname so I can change its color in CSS instead of alerting it.
I think it would be easier if you can write a function which I can use in beforeShowDay like:
$('#result').datepicker({beforeShowDay: function(date){
var date_start_period = 06/01/2014;
var date_in_period = 35;
var phase1, phase2, phase3, phase4;
if (Date == date_in_phase1){ return [true, classname_for_phase1, tooltip]}
if (Date == date_in_phase2){ return [true, classname_for_phase2, tooltip]}
....
}});
All I want is to change highlight background for days which belong to phases in repeated period.
Thanks