on 01-09-2006 9:16 PM
Hi all
Is it possible to set a default value for a date navigator.I mean with out picking the date from the Navigator, on load of the view itself i need a particualr date to be displayed (say 12/31/2000).
Thanks in advance
laksmi,
just set the values in the WDinit() method.
check for which attribute your are using for the date picker.
write the code as
wdContext.currentconextelement.setDate(newDate(System.currentTimeMillis()));
Then when it is loading you can get the default value.
Thanks,
SG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rohit
My problem is not fully solved.Am able to set the desired default Date.But now the Date Pikcher shows the Year of the Default Date. Ex: If i set the Default Date as 12/31/9999 the Date Picker when clicked shows the same Date.So if the User wants to select a Date in the current Year (2006) its impossible for user to click back arrow in the Date Picker from 9999 to 2006. So is there any way where i can set the Date Picker Value to todays date and the Input field value to Desire Date.
Thanks
Hi,
create a value attribute of type date bind to the input field and in wdInit()of view controller write this code..
wdContext.currentContextElement().setValueAttrName(new Date(Calendar.getInstance().getTimeInMillis()));
means ...
u r setting the date entered into some context ....
type of that attribute must be of date and for initial value write the above code ..if it is under node element create nodeelement bind it to context and write the code accordingly..
Message was edited by: Yashpal Gupta
Bind the "firstSelectedDate" property to a context attribute and set the value of this attribute as needed.
Armin
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.