on 10-29-2006 5:57 AM
Hi all,
I am having one date field .To display the date in correct format, I created a dictionary simple type of type date and entered dd/MM/yyyy in representation tab.
I was using 2004 and it was working properly. Now I am using 2004s for the same application. The problem is when I am selecting a date , it is showing the date in MM/dd/yyyy format in first time. If I selects the date again, then it will be in dd/MM/yyyy format. How can I make the selection in dd/MM/yyyy in first time itself
Thanks
Fahad Hamsa
Does anybody can help me.It is very urgent for me
Thanks
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The date is in dd/MM/yyyy format in local settings and selected the regional settings as English(UK).
Thanks
Fahad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi satyajit,
Thanks for the reply.I tried your solution, but not working. I found out one more thing. The problem is only for the application that is migrated from 2004 to 2004s.
Can you please give me some other solution for this.
Thanks
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fahad,
As a last resort all I can suggest is: in the Definition tab for the simple type set some value in the "Minimum inclusive" property. Set something like "1900-01-01".
If that doesn't work and if you have to stick to the requirement of not displaying any initial dates, then you can always implement your own date picker using the DateNavigator UI control.
Regards,
Satyajit.
Thanks Lohitha. But I didnt get the solution for my problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this:
1. Create a simple type in the local dictionary. Call it say, CustomDateType.
2. Set the built-in type as date.
3. Go to the representation tab and under "External Representation" set the format to "dd/MM/yyyy".
4. Create a context value attribute day, CustomDate and set its type to CustomDateType.
5. Create an inputfield with id say, "DateField" and bind its value property to CustomDate.
6. Now in your wdDoModifyView() write the following code:
if(firstTime){
IWDViewElement e = view.getElement("DateField");
e.requestFocus();
}
Regards,
Satyajit.
Hi,
use this code
Date date1 = new Date();
SimpleDateFormat fmtDatePlain = new SimpleDateFormat(" dd/MM/yyyy ");
String formattedDate = fmtDatePlain.format(date1);
System.out.println("todaysdate" +formattedDate);
thanks
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lohitha
I can do this if the input field is of type String since it is returning the formatted date as String. But my input field is of type Date.In my requirement, When the user selects a date using the date picker, the date should be displayed in dd/MM/yyyy format.
Thanks for the reply
Fahad Hamsa
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.