This seems a bit trivial but it is not working for me.
After selecting a date the text field is populated with the date in yyyy-mm-dd format.
For getting the value, I use this line:
var scan_date = document.getElementById("scan_date").value;
The PHP code is:
<input type=text id="scan_date" name="scan_date" value="<?php echo $scan_date;?>" class=input maxlength=10> <?php echo $flag;?>
After the form closing tag I have:
var cal1 = new calendar1(document.forms['addnew'].elements['scan_date']);
cal1.year_scroll = true;
cal1.time_comp = false;
I figured that's all the information that I need to put here for the experts to figure this out. It seems that it should be pretty straightforward.