JQuery UI の日付ピッカーに問題があります。フォームに 2 つの日付ピッカーを追加しましたが、フォームを送信すると、両方の日付ピッカーの値が送信されません。POST と GET を試してみましたが、どちらも機能せず、フィールドの名前も送信されませんでした。私は何が欠けていますか?
日付ピッカーを初期化するコードは次のとおりです。
$(function() {
$("#datepicker_Inicio,#datepicker_Fin").datepicker({
showOn: "button",
buttonImage: "./Images/date.gif",
buttonImageOnly: true,
dateFormat: "yy-mm-dd"
});
});
そして、フォームのコードは次のとおりです。
<form class="agregarForm" action="saveClient.php" name="agregarClienteForm" method="get">
<label class="formTitle">Agregar Cliente</label>
<br><br>
<label>Nombre:</label><br>
<input type="text" name="nombre_cliente_nuevo" style="width:200px;margin-top:7px;">
<br><br>
<label>Duración del Contrato:</label>
<label>Fecha de Inicio:</label>
<input id="datepicker_Inicio" type="text" style="width:100px;" name="fecha_inicio_contrato" onchange="dateFrom()" disabled><br>
<input id="duracion" style="width:50px;" type="number" min="1" name="duracion_contrato" onchange="dateFrom()"> <label>meses</label>
<label>Fecha de Fin:</label>
<input id="datepicker_Fin" type="text" style="width:100px;" name="fecha_fin_contrato" disabled><br><br>
<label>Presupuesto del Contrato: $</label><br>
<input type="text" name="presupuesto_contrato"><br><br>
<label>Porcentaje de ingreso: </label><br>
<label>BTW: </label>
<input type="text" style="width:50px;" name="ingreso_btw"><label style="margin-right:4%;">%</label>
<label>Herramientas: </label>
<input type="text" style="width:50px;" name="inversion_herramientas"><label>%</label><br><br>
<label>Categoría:</label><br>
<select id="categoriasList" name="categoria"><option>Política</option><option>IP</option></select><br><br>
<label>Subcategoría</label><br>
<select id="subCat" name="subcategoria"><option id="sub1">Campañas</option><option id="sub2">Gobierno</option></select><br><br>
<input type="button" value="Agregar Cliente" onClick="this.form.submit()">
</form>