Hi zeropaper,

thanks for this module. At first glance it's working. ;)
Compared to Dudel it of course lacks the Ajax voting due to the possibility of voting for nothing (which is far more important to me). I tested first with a single date field (CCK) and the head of the column said " 16/11/2009 (All day) -" even though no date2 was given (examined the code and to me it looks fine regarding the label building).

Best,
Paul

Array $rendering:
array (4) { 'date' => '16/11/2009', 'time' => '(All day)', date2 => null, time2 => null }

Comments

broon’s picture

Status: Active » Needs review

Played around a bit and found the 'To date' option in CCKs field configuration may cause the error. If it is set to 'Never' the $rendering array contains null values (see above). If it is set to 'Optional' and left blank it will automatically be filled with 'From date' value:

Array $rendering:
array (4) { 'date' => '16/11/2009', 'time' => '(All day)', date2 => '16/11/2009', time2 => '(All day)' }

By changing the else block from line 219 in date_picker_formatter.module from

          else {
            $date2 = NULL;
            $time2 = NULL;
          }

to

          else {
            $date2 = $date;
            $time2 = $time;
          }

this is fixed.

Best,
sin

zeropaper’s picture

Thanks a lot,
I did the changes, I commit it right now (edit: I'll commit as soon as I understand why CVS don't want to take my commit... ;( ).

All the best,
Valentin