//这里以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字段添加上日期插件效果,布布扣,bubuko.com
原文地址:http://blog.csdn.net/wjc19911118/article/details/37757011