I'm having trouble with incomplete historical dates in defining a CCK field, such as if the year and month is known but not the day. If I use either the pop-up calendar or the drop-down list, an entry left blank defaults to 01. If I try to manually type in a date with the calendar such as 2008-05-00 it results in a "date not valid" error. And I have been unable to work out how to get an input box with the widget option "Text field with custom input format" to see whether that will work.

Many thanks in advance.


choster’s picture

Status: Active » Closed (duplicate)

Unfortunately, the functionality you seek does not exist. It has been previously requested at http://drupal.org/node/259308 .

pxlar8’s picture

Okay, thanks. I was led astray by the documentation. On this page, http://drupal.org/node/92460, under Date (ISO), it says: "You can use it for incomplete dates, i.e. only a year or only a year and a month, and pad the other values with zeros, so it does not appear to be any more precise than it really is."

Perhaps that only applied to an older version, since it doesn't seem to work with the current version. But I have decided to use a simple text field instead since this issue applies to much of my data--it's not as elegant, but it works.

KarenS’s picture

Actually the 'duplicate' link is slightly different (or may be slightly different). The module should allow you to decide ahead of time that you're creating a field that will only have year and month but no day. All nodes created with that field will expect to have a year and a month and will not expect a day. The module does not (yet at least) have a way for you to have 'fuzzy' granularity -- sometimes a year, sometimes a year and a month, sometimes a complete date. The last is a feature request, the first should work now (but this module is still beta code so there could be problems that haven't been ironed out).

john@jronmorgan.com’s picture

Worse yet, entering an incomplete date will cause some other, random, date to be created.. for example: entering 1917-00-00 will get morphed into 1916-11-30