on 09-26-2008 10:06 AM
Hi All
I have problem with Date for me the requirement is the user can select 1st of EveryMonth
remaining other dates should be disabled.how couold i do it .please help me to solve this problem.
Thanks&Regards
Asif
Hi Asif,
I do not know, whether you have a compulsion of using a particular UI element. If not, I would suggest you to use two dropdowns, one for months and the other one for year. You can use Simple Types for Months and Years.
This approach will decrease the coding effort and will give a wide range of date options, without the user clicking for every month.
Hope this helps. If you need some more help, you can get back, I'll be happy to do so.
Cheers!!!
Umang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Asif
try this
simpletype of Built in type Date .. binded with input field ...
Calendar calendar = new GregorianCalendar(2007, 0, 1);
Date date = new Date(calendar.getTimeInMillis());
SimpleDateFormat f = new SimpleDateFormat("dd-MM-yyyy");
String formatedDate=f.format(date);
wdComponentAPI.getMessageManager().reportSuccess("the date"+formatedDate);
Final out put will be 01-01-2007
that's u can get only 01-01-2007 all other date fields disabled ...... i hope this code 'll help you ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi !
create an event for onselect if you are using dropdown.
then in the for loop get the values with the help of following code
wdContext.currentDDIndexElement().getValue();
and then disable elements .
thanks
vishal
Edited by: Vishal Anand on Sep 26, 2008 11:38 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Asif
You did not mentioned, which UI element you are using for displaying date fileds. You can disable them by mapping the desired ui element to contextattribute which is of boolean type and according to your requrement you can set that booleantype attribute as true/false, by which the corresponding ui element which is bound will get disabled or enabled.
Regards
Raghu
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 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.