PDA

View Full Version : Dojo date Picker and Dojo time Picker : Mapping to a single date Property



renjuthomas
Aug 20th, 2008, 07:03 AM
Hi All,

I want to bind a Dojo date picker and Dojo time picker to a single date type property in my form object.
ie, The date part of the date property should come from the date picker and the time part should come from the time picker.
If any of the forum member tried this way of date and time binding please share your thoughts or useful links.

Regards,
Renju.

Chris Messina
Jan 28th, 2009, 03:29 PM
I have a similar problem. I am not using Dojo, but I do have a form with separate date and time fields and would like to bind them to one java.util.Date object.

Is this possible, and how?

Thanks,
Chris

alexmarshall
Feb 22nd, 2009, 05:32 PM
Hi,

Yes, this is possible and I've implemented it on my own system. What you'll have to do is give the date input and the time input the same name, and create your own custom PropertyEditor that parses the strings in the format '[date format here],[time format here]' since that's how browsers submit multiple fields with the same name. You'll then have to make sure that the PropertyEditor you create is registered with either the FormAction you're using (for SWF1) or the ConversionService you're using (for SWF2).