When editing an existing node the from date is set to the to date at my installation (Drupal 5.1).
It seems like the value entry of the params array is never set to the from value in date_widget().

I added only one line to correct this (line 539):

            else {
              $params['label'] = t('From:');
              $params['field_name'] = 'value';
              $form[$field['field_name']][$delta] = date_text_input($params);
              $params['label'] = t('To:');
              $params['field_name'] = 'value2';
              $params['required'] = $field['todate'] == 'required'  && ($field['value'] || $field['required']) ? TRUE : FALSE;
              if (!$params['required'] && empty($delta['value2'])) $params['blank_default'] = 1;
              $params['value'] = $items[$delta]['value2']; // <- this on is new
              $form[$field['field_name']][$delta] += date_text_input($params);
              $form[$field['field_name']][$delta]['value2']['#weight'] += .1;
              $form[$field['field_name']][$delta]['#empty'] = empty($items[$delta]['value']) && empty($items[$delta]['value2']) ? TRUE : FALSE;
            }

Comments

mphilipp’s picture

Project: Calendar » Date

I am sorry, this is the wrong module, moved to date.module.

mphilipp’s picture

Additional info: datestamp field; jscalendar; site, Europe/Berlin; multiple not used, only from date required

karens’s picture

Status: Needs review » Fixed

That correction was made on Feb 8 and several other changes have been made since then, so you are not using the latest development snapshot. If you get current you should have no problems.

mphilipp’s picture

I didn't use HEAD but I'm pretty sure I used the latest 5.x-1.x-dev package. Never mind.

Anonymous’s picture

Status: Fixed » Closed (fixed)