//这里以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'; }
时间: 2024-12-12 19:05:28