How do I check the date form that without input?
There are two "Date Field".
If there is no input in one of them, I want to reset the other "Text Field", but I can't.
The following JavaScript is embedded in the "Text Field" that I want to reset.
In the example below, the "Text Field" is "AA_A".
The "Date Field" are "Day_Start" and "Day_Set".
By the way, "Text Field" is numeric.
And also readonly.
var AAAa = this.getField("AA_A");
var AAAb = AAAa.value;
var DayBa = this.getField("Day_B");
var DayBb = util.scand("yyyy/mm/dd", DayBa.value);
var DayBc = DayBb.valueOf();
var DayCa = this.getField("Day_C");
var DayCb = util.scand("yyyy/mm/dd", DayCa.value);
var DayCc = DayCb.valueOf();
All of the following do not work.
(1)
if (!DayBc || !DayCc ){this.resetForm("AA_A");};
(2)
if (DayBc == null || DayCc == null ){this.resetForm("AA_A");};
(3)
if (DayBc == undefined || DayCc == undefined ){this.resetForm("AA_A");}
(4)
if (DayBc == '' || DayCc == '' ){this.resetForm("AA_A");}
(5)
if (DayBc == 0 || DayCc == 0 ){this.resetForm("AA_A");}
Actually, I tried various other methods that I could come up with, but they were all useless.
For example, AAAb = '' on the right...
Thanking you for your advance.
