cancel
Showing results for 
Search instead for 
Did you mean: 

Date TableCellEditor

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member193726
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Manivannan,

I don't have to do this because I use a simpletype in which i can set the format. The UI element should then display it properly but it seems like the InputField doesn't do this. Maybe someone can confirm this anomaly?

regards,

Hugo