I understand that this script is a couple of years old now, but it's exactly what I had been looking for. However, the page I'm using it on has 2 date fields. Whenever I try to use this script for the second field, it will only update the first one.
Is there any way to get the two fields to work independently of each other? Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I understand that this script is a couple of years old now, but it's exactly what I had been looking for. However, the page I'm using it on has 2 date fields. Whenever I try to use this script for the second field, it will only update the first one.
Is there any way to get the two fields to work independently of each other? Thanks!
Even more years pass, but I've just used the script to provide two dates to set a date range.
I used the following HTML:
Maybe not that elegant, but the following changes to the script.js file work fine.
All they do is allow a field name to be set.
function setDateFld(fldName) {
document.getElementById("fldName").value = fldName;
viewcalendar();
}
function insertdate(d) {
window.close();
dateFldName = window.opener.document.getElementById("fldName").value;
window.opener.document.getElementById(dateFldName).value = d;
}