so, for instance, i could set up a flexinode content type to allow a user to sumbit a year but not also have to submit a month and day.

Comments

joshuajabbour’s picture

I second this. I'll see if I can come up with a patch, but date/time.inc looks mighty confusing. :)

Anyway, it would be nice to have on the "add date/time field" screen:

__ day of week __ month __ day __ year __ time

where those are checkboxes that toggle their display for that item. (I also added day of week in there, as it could be handy.)

When Bug #11572 gets fixed, similar functionality may be possible. (well, the user could optionally enter only certain information, but there would still be no way for the admin to set the defaults.)

sehh’s picture

I would also like to see this implemented.

I'm working on a site for CD music albums and having a date field for "Release date" that only takes Month/Year would be useful.

rkendall’s picture

I _also_ only wanted to display Month and Year (for the publication date for an online bookshop), and achieved the result needed with my phptemplate theme.

If you use a phptemplate theme, you could have a look at my example, which I posted as a comment in the Drupal handbook.
http://drupal.org/node/11811#comment-28887

When creating flexinode content it will still _ask_ for day and time information, but it will not display on the web pages.

There was not enough years to choose from for my needs, so I manually added more into the modules/flexinode/field_timestamp.inc file (in the $years array).

It's not that hard to hack things to work how you need them, but it would be good if this field type was a more generic and configurable field.

Maybe if I get some time I will have a go at a revised(or alternate) version of this field-type that is more configurable. But I'm not promising anything.

Bèr Kessels’s picture

Component: Code » Field type: timestamp

Good feature request, but for a specific field.