Datepicker - set the data inside the input field when one of the date is selected

Datepicker - set the data inside the input field when one of the date is selected

I have some holidays days:
  1. var holidayDays = ['24/12/2012', '2/1/2013', '14/2/2013'];
and code:
  1. if( parseInt($("#date").val()) == holidayDays ) {  
  2.         var freeday_value = ('holiday');
  3.         $('#holiday_day').val(freeday_value);
  4.     }

Who didn't work.

What

I want to achieve
: if in datepicker someone pick the date from above table, then on input field (#holiday_day) will be displayed word: holiday.

Thanks for any help.