RhythmAddict112
Programmer
Hi all. I'm not too familiar with JS and I've got a question that I think s
hould be easy for you JSers out there...
I am using a 3rd party javascript calendar and it is working great the probl
em is it starts with todays date when I load a page up. I need it to start
with yesterdays date however...
{
var aMonths = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
'11', '12'];
var oForm = document.forms.sample;
if (oForm != null)
{
oForm.elements.s_yr.value = this.getYear();
oForm.elements.s_mo.value = aMonths[this.getMonth()];
oForm.elements.s_dt.value = this.getDate();
}
}
the oForm.elements.s_dt.value = this.getDate(); line is what is populating t
he day in the calendar I believe. The problem is I need to somehow subtract
a day from that. "THIS" in that line, is an object in a the .js file assoc
iated with the calendar I believe. (as i mentioned I don't know too much ab
out JS) How can I achive this? I can attach more code if necessary. Thank
you in advance.
hould be easy for you JSers out there...
I am using a 3rd party javascript calendar and it is working great the probl
em is it starts with todays date when I load a page up. I need it to start
with yesterdays date however...
{
var aMonths = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
'11', '12'];
var oForm = document.forms.sample;
if (oForm != null)
{
oForm.elements.s_yr.value = this.getYear();
oForm.elements.s_mo.value = aMonths[this.getMonth()];
oForm.elements.s_dt.value = this.getDate();
}
}
the oForm.elements.s_dt.value = this.getDate(); line is what is populating t
he day in the calendar I believe. The problem is I need to somehow subtract
a day from that. "THIS" in that line, is an object in a the .js file assoc
iated with the calendar I believe. (as i mentioned I don't know too much ab
out JS) How can I achive this? I can attach more code if necessary. Thank
you in advance.