on 10-15-2007 2:53 PM
I have a inputfield bound to a context attribute of the type date. This gives me a date picker so the user can pick a date.
I want to limit the date choices the user has. How can i make sure that the user can only select the date from. lets say, today an on? But not a date before today.
Hi
1. use date navigator
2. create two simple type of date
3. set value to that simple type in your init method min and max(may be todays date and after 20 years from today)
4. find firstselecteddate and last selecteddate property in your date navigator and bind it with those simple types.
Regards
Abhijith YS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Date today=new Date();
IYourNodeElement node=wdContext.createYourNodeElement();
if(!node.getYourDate()=today||node.getYourDate().beforeDate(today)){
....continue ur code
}
else{
wdComponentAPI.getMessageManager.reportWarning("Sorry can not accept a date less than todays date");
}
Regards
Abhijith YS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can make it using
Minimum Inclusive
Maximum Inclusive
Minimum Exclusive
Maximum Exclusive
with your type
Regards
Abhijith Ys
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
good
go through this link,hope this would help you to solve your problem.
http://www.apress.com/resource/bookfile/1030
thanks
mrutyun^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.