diff -Nurp ../date.orig/date/date_admin.inc ./date/date_admin.inc --- ../date.orig/date/date_admin.inc 2010-04-15 08:08:56.000000000 -0500 +++ ./date/date_admin.inc 2010-04-15 08:10:30.000000000 -0500 @@ -16,7 +16,7 @@ function _date_widget_settings($op, &$fi return date_widget_settings_form($field); case 'save': - return array('default_value', 'default_value_code', 'default_value2', 'default_value_code2', 'input_format', 'input_format_custom', 'increment', 'text_parts', 'year_range', 'label_position'); + return array('default_value', 'default_value_code', 'default_value2', 'default_value_code2', 'size', 'input_format', 'input_format_custom', 'increment', 'text_parts', 'year_range', 'label_position'); case 'validate': if ($field['default_value'] == 'strtotime') { @@ -110,6 +110,14 @@ function date_widget_settings_form($widg foreach ($formats as $f) { $options[$f] = date_format_date($now, 'custom', $f); } + $size = (isset($widget['size']) && is_numeric($widget['size'])) ? $widget['size'] : 60; + $form['input']['size'] = array( + '#type' => 'textfield', + '#title' => t('Size of textfield'), + '#default_value' => $size, + '#element_validate' => array('_element_validate_integer_positive'), + '#required' => TRUE, + ); $form['input']['input_format'] = array( '#type' => 'select', '#title' => t('Input format'), '#default_value' => !empty($widget['input_format']) ? $widget['input_format'] : $default_format, @@ -713,4 +721,4 @@ function _date_formatter_settings($form_ ); } return $form; -} \ No newline at end of file +} diff -Nurp ../date.orig/date_api_elements.inc ./date_api_elements.inc --- ../date.orig/date_api_elements.inc 2010-04-15 08:08:56.000000000 -0500 +++ ./date_api_elements.inc 2010-04-15 08:11:54.000000000 -0500 @@ -145,6 +145,7 @@ function date_text_process($element, $ed $element['date']['#type'] = 'textfield'; $element['date']['#weight'] = !empty($element['date']['#weight']) ? $element['date']['#weight'] : $element['#weight']; + $element['date']['#size'] = !empty($element['date']['#size']) ? $element['date']['#size'] : $element['#field']['widget']['size']; $element['date']['#default_value'] = is_object($date) ? date_format($date , $element['#date_format']) : ''; $element['date']['#attributes'] = array('class' => (isset($element['#attributes']['class']) ? $element['#attributes']['class'] : '') .' date-date'); $element['date']['#description'] = ' '. t('Format: @date', array('@date' => date($element['#date_format'], time()))); @@ -659,4 +660,4 @@ function date_convert_from_custom($date, // Don't test for valid date, we might use this to extract // incomplete date part info from user input. return date_convert($final_date, DATE_ARRAY, DATE_DATETIME); -} \ No newline at end of file +}