problem with datepicker

problem with datepicker

hi
i have an update form with a text field that its value is the date from the database.

at first when i added the datepicker it show today`s date and not the one from the database so i try to use setDate.

but now it does not show the date from the database.

all i need is that when the user enter the form it will display the date from the database and that when the user want to change the date he will be able.

i use this code:









var updateDate = $("#form1 input#date").val();
$("#form1 input#dateforupdate").datepicker();
$("#form1 input#dateforupdate").datepicker('setDate', updateDate);
$('#form1 input#dateforupdate').datepicker('option', 'dateFormat', 'dd/mm/yy');
$('#form1 input#dateforupdate').datepicker('option', 'dayNamesMin', ['¿¿', '¿¿', '¿¿', '¿¿', '¿¿', '¿¿', '¿¿']);
$('#form1 input#dateforupdate').datepicker('option', 'isRTL', true);
$('#form1 input#dateforupdate').datepicker('option', 'monthNames', ['¿¿¿¿¿','¿¿¿¿¿¿','¿¿¿','¿¿¿¿¿','¿¿¿','¿¿¿¿','¿¿¿¿','¿¿¿¿¿¿','¿¿¿¿¿¿','¿¿¿¿¿¿¿','¿¿¿¿¿¿','¿¿¿¿¿']);






the bizzare charachters are hebrew days and months names.

well if i use this: $("#form1 input#dateforupdate").datepicker('setDate', date);


it does show the right date but now the hebrew days and moths and the rtl stop working.

what am i missing here?

best regards