2008/11/26 Jens Schwarz <[EMAIL PROTECTED]>: > Hi *, > > I know the 'Date' element of FormFu which works fine. But now I need an > element where I can also select time in the same manner (my mySQL db has a > 'datetime' column). > > Putting a 'Date' and two 'Select' elements (i.e. hour and minute) into a > 'Multi' element does not seem to work (I have read this somewhere in the > depths of this malinglist and also tried it by my own hand) - mainly because > of the 'Date' element being a 'Multi' element itself. > > So my question: How do you implement such a 'DateTime' element so that it > runs smoothly with Catalyst and DBIx?
I've added a DateTime element to svn. It's a sub-class of HTML/FormFu/Element/Date.pm and adds extra 'hour' and 'minute' Select menus. The tests cover passing a DateTime object to $field->default() and outputting a DateTime object by setting $field->auto_inflate(1) - so that should cover integration with DBIx::Class::InflateColumn::DateTime. You will need to be running HTML-FormFu from svn for it to work - it needs changes to the Date element which were made since the last cpan release. I plan to add an option to limit the minute menu, so for example, it will only list every 5 minutes (00,05,10,etc) - but haven't gotten around to that yet. Carl _______________________________________________ HTML-FormFu mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
