Thanks!

But how do I use this constraint if I have several date fields in my
form? Suppose I have two dates which would mean 6 fields on the form
(per your explanation above). Do I just pass all 6 in order to the
constraint? or am I missing the point entirely?

On 11/26/06, Michele Beltrame <[EMAIL PROTECTED]> wrote:
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

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to