When applying the #disabled attribute to a date_popup field that includes both date and time fields, only the date field is being disabled. Attached is a patch against 6.x-2.6 to fix the problem.

Comments

mrfelton’s picture

Works for me!

sirtet’s picture

Version: 6.x-2.6 » 7.x-2.x-dev

Problem still here with 7.x-2.x-dev 2011-Aug-02.
I guess it has to do with the fact, that in the field-settings there's no option to set a date field as disabled (why that?).

I disable a date-field through a custom module with

$form['submitted']['fg_kurs']['datum_0']['#disabled'] = TRUE;

Is there a way to also deactivate the date_popup via php?
This could be used as a quick workaround.

marthinal’s picture

Issue tags: +date_popup
StatusFileSize
new594 bytes

Yes its works but maybe we could do it with attributes like with date field.

grendzy’s picture

Status: Needs review » Needs work

patch doesn't apply to 7.x.

karens’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

The patch in #3 bears no resemblance to the 7.2 version of date (there is no such function). The original patch is for D6 and I suspect that one is too.

marthinal’s picture

Yes karen its for d6 and i think we could commit if it works

damienmckenna’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Unfortunately the D6 version of this module is no longer supported, but we appreciate the time you put into this. If this problem is relevant for D7 too, please reopen the issue. Thanks.