I have a date field that includes granularity up to "minute." (It is set to store data in ISO format, not unix timestamp format.)

In most cases, users will need to include a time as well as day, month, and year. In some cases, my date field needs to store a date but no specific time. Is there a way to allow users to submit dates with no time?

(The usual 'padding' of the value with 0 does not seem to work with time values.)

THANK YOU for your help!

Comments

michelle’s picture

Sorry to bump this with no answer, but I need this as well and want to track the issue.

Thanks,

Michelle

karens’s picture

Title: Set date with no time ? » Make time optional

I'm not completely sure I understand the question. If the question is whether you can just input '00' for the time, you should be able to do that if you use an ISO date as a text field. A unix date will expect a 'real' time and the select widget doesn't have a zero option in the selector, so you'd need a textfield.

The program should not be forcing an hour for an ISO date, the question is whether there is anything hanging around in there that prevents it from working, since I haven't tried it out myself. If it doesn't work, it may be something that needs fixing since it *should* be possible.

aren cambre’s picture

Title: Make time optional » Allow variable granularity on date/times
Category: support » feature

I can take this a step further. It would be nice to have variable granularity where I can only specify as much precision as I need or know.

For example, go to http://whiterockdistrict.org/events. Notice how most events have a specific date and time, but notice how some, such as New Leaders Essential Training (http://whiterockdistrict.org/node/118) shows it starts at midnight. If I just enter the date and do not enter a time, instead of assuming the date is the most specificity (finest granularity) I can provide, the Date module reports that I entered midnight on that date.

I changed to variable granularity because for some node types, we may not have the same precision on all dates. It is possible that some nodes are only as specific as the year whereas others get as specific as a second. It would be nice to have one field that has all that granularity.

aren cambre’s picture

Version: 5.x-1.4 » 5.x-1.6
Component: Miscellaneous » Code

Changing version.

karens’s picture

Status: Active » Postponed

I was afraid that might be what you meant, that's much harder to do :(

It won't get in right away, there are other priorities, but maybe later.

karens’s picture

Version: 5.x-1.6 » 7.x-1.x-dev

Definitely won't go into 5.1, probably not 5.2 either unless someone provides a patch, but maybe in D6.

avguy1’s picture

Just checking on this to see if it is still 'in the works'?

Thank you

choster’s picture

Status: Postponed » Closed (duplicate)

Marking as a duplicate of http://drupal.org/node/259308 .

jonhattan’s picture

Issue summary: View changes
Related issues: +#259308: Allow "fuzzy" granularity