datepickerテキストボックスに日付を最初に設定するか表示するのに問題があります 2つのテキストボックスがあり、1つはdatepicker、2つ目は代替フォーマットです。このjquery-ui datepickerを使用してテキストボックスに日付を設定または表示
$("#birth_date_display").datepicker({
dateFormat: "d M, yy",
altField: "#birth_date",
altFormat: "yy-mm-dd"
});
よう
<input type="text" id="birth_date_display" />
<input type="text" id="birth_date" />
とスクリプト私の質問は、私のような文字列を持っている場合どのように、次のとおりです。VAR datebirth =「2011-08-16」
それから私は、テキストボックスに設定したいです。
document.getElementById("birth_date_display").value = datebirth; //it's NOT works
document.getElementById("birth_date").value = datebirth; //it's works
感謝:)