on 08-14-2006 3:26 PM
hi
I have created two views with my input field UI element of type date.Actually problem is that i want date in my second view input field to be not more than the date in my first view input field UI element and if it is the case it show some error.Please provide me with this logic?
regards
Nidhideep
Hi,
assuming you're working with wdp for Java:
Date d1 = wdContext.currentElement.getSomeDate1();
Date d2 = wdContext.currentElement.getSomeDate2();
if (d1.before(d2)) {
// d1 is before d2
} else {
// d1 is after d2
}
Good luck, Roelof
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nidhideep ,
For your requirement you can create a context variable(date) in the Controller, from the first view assign date to the context variable and from second view just get this variable and check with the local variable with the below condition.
Date d1 = // Get first view variable
Date d2 = // Get second view variable
if(dd.before(d2)){
}else{
}
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.