开发者

Drupal Date Filed Problem

I am using custom module in drupal and i am working in hook_form_alter() .

I am passing date format as this type.

But it is not working and filed type is DATETIME.

Please help me...

$form['field_res_inq_time_arrival'][0]['#default_value']['value'] = date('d/m/Y - h:m',strtotime('201开发者_开发问答1/04/13')); 

Regards

Aasim Afridi


From Form Api Reference:

The #default_value will be today's date if no value is supplied. The format for the #default_value and the #return_value is an array with three elements with the keys: 'year', month', and 'day'. For example, array('year' => 2007, 'month' => 2, 'day' => 15)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜