Re: [PATCH] zope-formulator hide day for DateTime
Clemens Klein-Robbenhaar <crobbenhaar-S0/[email protected]> Thu, 03 Mar 2005 23:51:31 +0100
| Newsgroups | gmane.comp.web.zope.formulator.devel |
|---|---|
| Message-ID | <[email protected]> |
Ian Duggan wrote: > The attached patch adds an option to DateTime fields to hide the day when > rendering the form element. This allows you to have date selections for > MONTH, YEAR type things. The datatype is still a full date, but it defaults > to the first or today, depending on the value of "default to now". I remember vaguely I had a similar requirements from some customer some months ago, and tried to solve it with a custom field. In th end this has been a nearly full copy & paste from the DateTimeField and its companion classes. Well, normally I would not like to apply patches to add features to the DateTimeField, as its complicated enough anyway, but in this case I feel myself the need for the feature and have learnt that trying to get the issue via an extension has led to rather undesireable results, so I am in favor to apply the patch. What do others think? Any pros or cons, or maybe ideas to achieve the issue differently ? Cheers, Clemens