[Catalyst] How to use HTML::Widget::Constraint::Date
Michele Beltrame
mb at italpro.net
Sun Nov 26 17:52:54 GMT 2006
Hello!
> my $c = $widget->constraint( 'Date', 'year', 'month', 'day' );
>
This constraint requirtes you to have three fields: one with day, one
with month, one with years. This a common thing, as in many cases there
are three select boxes which allow the user to select a date.
Others (including me) use a single text field maybe with some help such
as JSCalendar. In this case you might be better off defining a filter
which creates a DateTime and then work with that. This is also handy if
you need to store the data in a database, as you can define an inflater
for DateTime objects.
Michele.
--
Michele Beltrame
http://www.varlogarthas.net/
ICQ# 76660101
Informativa privacy: http://www.italpro.net/em.html
More information about the Catalyst
mailing list