Having problem in setting DateCombo in Sortabletable cell

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Having problem in setting DateCombo in Sortabletable cell

Postby raghun » Tue Nov 20, 2007 11:55 pm

I am having a problem in setting DataCombo box in SortableTable cell.
My table contains Date column for which i am using a date combo box,I am setting the cell editor as DateCellEditor, i am getting the date as 27 Oct 1983.
I am unable to format the date in mm/DD/YYYY format.
raghun
 
Posts: 3
Joined: Tue Nov 20, 2007 11:50 pm

Postby JIDE Support » Wed Nov 21, 2007 2:17 am

It is done by DateConverter/CalendarConverter. By default, we use SimpleDateFormat's MEDIUM format to convert a Date or a Calendar to String. You can register your own converter on ObjectConverterManager if you want to change it.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby raghun » Wed Nov 21, 2007 4:38 am

I tried using DateConvertor, I am able to convert the date to MM/dd/yyyy format, but it is setting the value in the table cell only once.
Now once the Date is set in the cell ,if now we click on the cell it gives error, because i have set the CellEditor as DateCellEditor and the formatted date that i have from DateConvertor is in String format.
So i am setting String in cell for the first time ,but as i click on the cell next time it gives error because it needs a Date.

Can you please help me formatting a date in MM/dd/yyyy format that returns a Date object and not a String.
As all the DateFormat method's ,SimpleDateFormat("MM/dd/yyyy") and all return a String.........!!
raghun
 
Posts: 3
Joined: Tue Nov 20, 2007 11:50 pm

Postby JIDE Support » Wed Nov 21, 2007 6:44 am

DateFormat's parse return Date. Is it what you are looking for?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby raghun » Wed Nov 21, 2007 7:17 am

abc
Last edited by raghun on Wed Nov 21, 2007 8:32 am, edited 1 time in total.
raghun
 
Posts: 3
Joined: Tue Nov 20, 2007 11:50 pm

Postby JIDE Support » Wed Nov 21, 2007 7:37 am

Sorry but I didn't understand your question. The Date is 11/21/2007. The toString of DateConverter gives you "11/21/2007". Everything seems normal to me.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 68 guests