on 11-27-2006 10:59 AM
Hi SDN,
When I bind a Input field to the date data type there accompanies a date picker,
Is there a time picker similar to the date one,
If there is no such time picker, can u suggest me how to display current system time in HH:MM:AM/pm or in 24 hour format. but in time data type but not as hours":"minutes":"sec (which is going to be a string data type)
Thanks in advance,
Regards,
Sai krishna.
Hi,
As far as I know there is no such time picker.
Regarding your second question:
1. Create a simple type, say timeStamp in the local dictionary. Switch to the representation tab and in the Format field enter "HH:mm:ss". Save.
2. Create a context value attribute say, CurrTime and change its type to the newly created simple type, timeStamp.
3. In wdDoInit, or whereever you want to set the value, use this code:
long millis = System.currentTimeMillis();
Date currDate = new Date(millis);
Time currTime = new Time(currDate.getTime());
wdContext.currentContextElement().setTimeStamp(currTime);
4. Insert an inputfield into the view and bind the value property to the context attribute.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai,
How user will switch between am/pm or 24 hour format? If its Radio buttons or Drop Down then any ways some action will be generated. So you can either use single input field with two attributes and switching binding attribute dynamically on event or you can use two input fields with Visibility property.
Regards
Abhilash
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.