on 01-10-2008 5:40 AM
I have an input UI element that is mapped to a date context element and I get the standard date picker with this. I am wondering if it is possible to limit the date range in the date so that user can not select dates in the past?
Cheers,
Derek
Hi,
You can acheive this by
Creating a calculated attribute of type date and bound this to the InputField
For a calculated field you will be able to see the setter and getter
in the setter method you can write your logic to restict the entry.
When the entry is not acceptable raise a context expection.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Derek
As far as i know we cant limit the date using date input UI element , you can achieve this programatically.
Date today=new Date();
if(<your node>.get<YourDate>().beforeDate(today))
{
wdComponentAPI.getMessageManager.reportWarning("Sorry can not accept a date less than todays date");
}
else{
// Proceed with your code..
}
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.