please help
I used the date range demo in my code
but when I submit the form the date input is not in the input list
my code is:
I used the date range demo in my code
but when I submit the form the date input is not in the input list
my code is:
<script type="text/javascript">
$().ready(function() {
function startChange() {
var startDate = start.value();
if (startDate) {
startDate = new Date(startDate);
startDate.setDate(startDate.getDate() + 1);
end.min(startDate);
}
}
function endChange() {
var endDate = end.value();
if (endDate) {
endDate = new Date(endDate);
endDate.setDate(endDate.getDate() - 1);
start.max(endDate);
}
}
var start = $("#valid_from").width(200).kendoDatePicker({
change: startChange,
format: "dd-MM-yyyy"
}).data("kendoDatePicker");
var end = $("#valid_to").width(200).kendoDatePicker({
change: endChange,
format: "dd-MM-yyyy"
}).data("kendoDatePicker");
start.max(end.value());
end.min(start.value());
});
</script>
<form action="xxx" method="post">and when I submit the form the valid_from and valid_to is missing in the POST<input type="hidden" name="request_id" value="9" /> <input type="hidden" name="product_id" value="19" /><table><tr> <td><strong>Valid From</strong></td> <td> : <input type="text" name="valid_from" value="21-02-2012" id="valid_from" readonly="readonly" maxlength="20" size="20" /> </td> <td><strong>Valid To</strong></td> <td> : <input type="text" name="valid_to" value="21-02-2012" id="valid_to" readonly="readonly" maxlength="20" size="20" /> </td></tr><tr> <td colspan="3"> <input type="submit" name="btnSave" value="Save" /> <input type="button" id="btnBack" value="Back" onclick="window.history.back()" /></td> </tr> </table> </form>
array(6) {
["request_id"]=>
string(1) "9"
["product_id"]=>
string(2) "19"
["btnSave"]=>
string(4) "Save"
}