hello, i've searched lot & spent hours trying work out no luck..
suppose want make sure javascript date selected pop calendar greater today's date.
i dont't want use formcalc because have other javascripts on field
data pattern & display pattern of field dd/mm/yyyy
when alert (this.rawvalue) date in yyyy-mm-dd format.
i have experimented (probably written 1000 lines of code & failed miserably) date displayed in dd/mm/yyyy format, want check greater current date.
if has few spare seconds please explain should including util.scand's, util.printd's, new date()'s etc?
it's driving me mad , must move on.
what want end might or might not (?)..
but not able d1 & d2 in appropriate formats try..
if (number(new date(d1)) <= number(new date(d2)) //or if (d1>=d2) ...
{
app.alert("the required date cannot before today's date.");
this.rawvalue = "";
}
thank hopefully!
suppose want make sure javascript date selected pop calendar greater today's date.
i dont't want use formcalc because have other javascripts on field
data pattern & display pattern of field dd/mm/yyyy
when alert (this.rawvalue) date in yyyy-mm-dd format.
i have experimented (probably written 1000 lines of code & failed miserably) date displayed in dd/mm/yyyy format, want check greater current date.
if has few spare seconds please explain should including util.scand's, util.printd's, new date()'s etc?
it's driving me mad , must move on.
what want end might or might not (?)..
but not able d1 & d2 in appropriate formats try..
if (number(new date(d1)) <= number(new date(d2)) //or if (d1>=d2) ...
{
app.alert("the required date cannot before today's date.");
this.rawvalue = "";
}
thank hopefully!
i use following js convert rawvalue date js date format. don't know off top of head how compare js dates.
var thisdate = mydatefield.rawvalue;
//convert js format replacing "-" "/"
thisdate = thsdate.replace(/-/g,"/");
var termdate = new date(thisdate);
var thisdate = mydatefield.rawvalue;
//convert js format replacing "-" "/"
thisdate = thsdate.replace(/-/g,"/");
var termdate = new date(thisdate);
More discussions in LiveCycle pre-ES (6.x and 7.x) discussions
adobe
Comments
Post a Comment