Hello! I'm trying to get input box to show different dates depending on the users selection from select box. If user select today today date should show if tomorrow, the date for tomorrow.
My qustion is how do I get the select box to show the correct date?
<?php
$tomorrow = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+2, date("Y")));
$today = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d"), date("Y")));
?>
<script>
$(document).ready(function(){
$("#select-bil").change(function () {
<?php
echo 'var datum = "'.$tomorrow.'";'
?>
var str ="";
$("#select-bil option:selected").each(function () {
});
$("input[name$='div-one']").val(datum);
})
.change();
});
</script>