How to Store the Old Date into Variable and Call it again
Hi Experts..
I write code in checkbox so when clicked it will show (today date) inside date field, the problem is that i want when the user uncheck the Checked box it will restore again the old date, i try to store the date many ways but the script is ignoring any variable to store the old date,, so it ends me to call the old date from another field,, but are there any way straight forward in the same code , here is my code inside ( MouseUp Event of the Checkbox) :
// Write Today Date in Georgian
//WriteTodayDate if Checked
// box is checked
if (event.target.value != "Off") {
// get todays date object
var oNow = new Date();
var sNow = util.printd("yyyy/mm/dd", oNow);
// set date now
this.getField("todaysDate").value = sNow;
} else {
// box is unchecked
//Set the Old date
var OrgDate = this.getField("PrevDate").value;
this.getField("todaysDate").value = OrgDate;
}
and Thanks in Advance for any help
