[Zope] Re: Better Date processing?
Josef Albert Meile
jmeile at hotmail.com
Mon Sep 15 07:04:12 EDT 2003
>I'm using Zope 2.6.1, and lots of the products I'm creating require that
>dates be entered in web forms and then stored as DateTime objects (since
>I need to compare them, etc.).
>
>However, using the <input .. name="foo:date"> results in
>user-unintelligible error messages when the format is not correct, and
>the formats accepted are not very flexible.
>
>Is there a better way? Is there a product that does a better job of
>handling date input/output?
Hi Dustin,
I think it would be better if you read the date in at least two comboboxes
(one
for the month and one for the day) and one text input for the year. Then
you
have to concatenate the three values and create a DateTime object. So that
you can make sure that the user won't make a mistake. If you want to
validate
the leap years and the end of the months, there are plenty of Javascript
that do
that, or you could check it after the form is sumited via python.
Regards,
Josef
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
More information about the Zope
mailing list