on 08-17-2007 9:37 AM
Hi,
I have a table in which the user should be able to input a date but I can't seem to find the TableCellEditor of the type date. Is it possible or does the user have to input it manually and I need to validate/parse it. Im working with NW2004 sp18.
Much thanks,
Hugo
Hi Hugo,
I tried using dd-MM-yyyy format and it works. It shows 15-08-2007. If I use dd-M-yyyy it works displaying 15-8-2007.
I think its not possible to change the format as per you expect.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rekha,
The strange thing is that if i just display a context of type date with format dd-MMM-yyyy it does show the date as 15-Aug-2007 and not like 15-088-2007. Seems that the TextView as TableCellEditor has a different implementation then the InputField as a TableCellEditor for the method responsible to rendering the date.
regards,
Hugo
Hi Hugo;
To get a date picker, you can use a input field and the attribute assigned to the inputfield should be of "Date" data type.
Thanks
Sivaprasath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just use InputField as editor. If bound against an attribute of type "date" the input field will display a date picker and validate the entered string as a date automatically.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aah, ok. Thanks. See that it works like that. 1 Extra question though. I have a custom simple type for dates, with the format set to dd-MMM-yyyy. When i use the datepicker in the table to set a date, it shows it like 15-088-2010 in the table...instead of 15-Aug-2010. Is there a way to fix this or do i have to make a custom simple type for dates in tables?
thanks!
regards,
hugo
Hi Hugo,
u want dd-MMM-yyyy this format, u will do some implementaions
Date dtTmp1 = new SimpleDateFormat("dd-MMM-yyyy ").parse(Date);
Date1 = new SimpleDateFormat("MM/dd/yyyy").format(dtTmp1);
Calendar Fdt = Calendar.getInstance();
Fdt.setTime(dtTmp1);
now u got a dd-MMM-yyyy this format.
did u clear ur doubt.
Regards,
P.Manivannan.
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.