You are here

function node_field_date_widget in Node Field 7.2

Widget for date field.

1 string reference to 'node_field_date_widget'
node_field_types_info in includes/node_field.field.inc
Node field types info.

File

includes/node_field.field.inc, line 486
Field types, settings, widget and formatters.

Code

function node_field_date_widget($node_field) {
  $form = [
    '#type' => 'date_popup',
    '#title' => $node_field['title'],
    '#date_format' => 'm/d/Y',
    '#date_year_range' => '-90:+10',
    '#default_value' => $node_field['value'],
  ];
  return $form;
}