We want the date field to default to today's date when creating a new article. In the node edit form it defaults to the date set in the content type field settings. In the field settings form, it says "leave blank to use the time of form submission". If we leave it blank, it saves the form submission time which is then the new default for the node edit form.

How do we make the date field in the node edit form always show today's date for new content?

field settings

  • Is that a new field you added or the node created field?
    – mpdonadio
    Dec 20, 2017 at 16:15
  • 1
    Some clarification: We are actually using the standard Timestamp field and not the Date field. When creating the Date field it allows using "Current time" while the Timestamp field defaults to the time of the field settings form was saved. Dec 22, 2017 at 7:55

3 Answers 3


If already date field created follow the below steps to change the date formate:

  1. Goto particular Content type, which you have created.


  1. click on the 'Manage Fields' form the tab menu

  2. click on the 'edit' button on the date field of the content type. The field settings will open, the link will be


Goto bottom of the page

  1. Select the 'Current date' option from the drop down at the section of 'default value'.

  2. To display only the date without time, goto 'Field settings' and select the 'date only' option from the drop down of 'Date type'.


you can set it by code just implement form alter hook in your custom module and set your date like,

function example_form_alter(&$form, &$form_state, $form_id) {
  dsm($form_id);  // print form ID to messages
  if($form_id == "your contentype form-id"){ 
  if(!isset($form['your field name']){
  //set your field value as default current time
    $today = date('d/m/Y');
    $form['your field name']["und"][0]['value']['#default_value']['value'] = $today;

You can setting config field {example.com}/admin/structure/types/manage/event/fields/{field_date}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.