What's about support for date time field?
There is:
elseif ($field['type'] == 'date' && $field['todate'] == 'required' && $field['required']) {
$date_fields[$field['field_name']] = $field['widget']['label'];
}
My solution:
elseif (($field['type'] == 'date' || $field['type'] == 'datetime') && $field['todate'] == 'required' && $field['required']) {
$date_fields[$field['field_name']] = $field['widget']['label'];
}
But I didn't test it if it will work.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | second-datetime.patch | 1.11 KB | garg |
| #9 | 344362_datetime_support.patch | 1.56 KB | deviantintegral |
| #5 | resource_conflict.module.datetime.patch | 1.28 KB | redben |
Comments
Comment #1
kenorb commentedComment #2
pdcarto commentedAre there any plans to address this feature request?
Comment #3
pdcarto commentedI would expand this feature request as follows:
Support all date field types. RC should not fail to work just because a content type doesn't use its preferred date field type.
Comment #4
redben commentedI would have expected this behaviour (not supporting datetime) I too think it is a must have.
So +1
Comment #5
redben commentedI have made a patch to resource_conflict.module including the code from knorb and changed _resource_conflict_overlaps_from_date tp support date_make_date from DATE_DATETIME format. It is my first contributed patch, if there is a problem please tell me and i'll correct it. Note that the patch has been made against version 2.0
Comment #6
redben commentedForgot to mention that i tested it with my datetime field and it worked as expected :-)
Comment #7
deviantintegral commentedThanks redben for the patch. A few notes:
Otherwise, it looks good - it'd be great if someone else tested this too.
Comment #8
finex commentedI've tested the patch and it is works fine.
Comment #9
deviantintegral commentedThanks FiNeX for the testing. I've fixed the code style and committed this to CVS.
Comment #10
garg commentedI don't know if this is required for this, but for completeness should this be changed as well?
Inside function _resource_conflict_display_conflict_errors it currently says:
Changed to:
Comment #11
deviantintegral commented@garg, it'd be great if you could wrap your code with
<code>tags. Or better yet, create a patch file.That change seems reasonable; can you verify it's broken in the current -dev release?
Comment #12
garg commentedI edited my first message and added the code tags. The current -dev tarball does not have the proposed change. I have attached a patch file to this message.
I hope I'm doing this right.
edit: Oops, I just noticed the naming convention for patches. I'll remember that for next time.
Comment #14
deviantintegral commentedThis never got re-opened.
Comment #15
nhck commentedThis must so definitly go in! I was surpised at first that it wouldn't work w/ datetime. After upgrading to dev and applying this patch it is so nice. Please get this out the door soon :-)
I tested it and it works. Nice stuff. So nice.
Comment #16
deviantintegral commentedI've committed the patch in #12, along with some whitespace code style fixes.