//这里以created字段为例子 function Hook_form_alter($form,$form_state,$form_id){ $form['created']['#type'] = 'date_popup'; $form['created']['#date_format'] = 'Y-m-d'; $form['created']['#size'] = 20; $form['created']['#attributes']['readonly'] = true; $form['created']['#date_label_position'] = 'within'; }
drupal7 如何将一个date字段添加上日期插件效果
时间: 2024-12-27 09:03:01