[html-formfu] Re: Date Element

Tobias Kremer list at funkreich.de
Mon Aug 6 09:16:05 GMT 2007


Hi Carl,

> I've now checked in a new 'date' element.
> I've still got some more features to add to it, but it's got the basics down.

Thanks very much. I gave it a spin and it already looks pretty good. Here's some
quick feedback.

1.) The list of month names could be automatically set depending on the locale
specified with languages() using DateTime::Locale:

my $loc = DateTime::Locale->load( $language );
my @months = defined $self->months
  ? @{ $self->months }
  : @{ $loc->month_names }

Alternatively, the class specified via localize_class() could be queried for the
monthnames (and maybe in turn use DateTime::Locale to fetch them). What do you
think?

2.) By default there shouldn't be a valid date selected. The three select
fields need some default entries like "Day", "Month", "Year". Of course, it
should be possible to localize these somewhere without having to specify them
for every Date element. Unfortunately DateTime::Locale doesn't have
translations for these.

--Tobias



More information about the HTML-FormFu mailing list