jquery 日付ピッカーをトリガーする 2 つのテキスト フィールドを持つフォームがあります。
同じフォームにあるチェックボックスをオフにして、両方のテキスト フィールドに空の値を設定したい。
テキスト フィールドは次のとおりです。
<?php
if ($_GET["arrival"]== "")
echo '
<label for="arrival">Arrival </label>
<input type="text" name="arrival" class="w8em format-d-m-y highlight-days-67 range-low-today" id="arrival" value="Select Date"/> ';
else
echo '
<label for="arrival">Arrival </label>
<input type="text" name="arrival" class="w8em format-d-m-y highlight-days-67 range-low-today" id="arrival" value="' . $_GET["arrival"] . '"/> ';
?>
<?php
if ($_GET["departure"]== "")
echo '
<label for="departure">Departure </label>
<input type="text" name="departure" class="w8em format-d-m-y highlight-days-67 range-low-today" id="departure" value="Select Date"/> ';
else
echo '
<label for="departure">Departure </label>
<input type="text" name="departure" class="w8em format-d-m-y highlight-days-67 range-low-today" id="departure" value="' . $_GET["departure"] . '"/> ';
?>
チェックボックスは次のとおりです。
<input name="avail" type="checkbox" id="avail"
<?php if ($_GET["avail"]== "1") echo "checked=\"checked\""; ?>
value="1" />
選択を解除して、空の値をテキスト フィールドに設定したい。