Good morning,
I think I've found a bug in 4.7, but since I'm relatively new to drupal, I hoping someone else can confirm it before I post a bug report.
I believe the bug is related to this post.
When creating a form element of type "date" when using the new forms API, it looks like the date that the user sets isn't displayed correctly when previewing the content. I've created a tiny module to demonstrate:
<?php
function DatePreviewBug_node_info() {
return array('DatePreviewBug' =>
array('name' => t('DatePreviewBug'),
'base' => 'datepreviewbug'));
}
function DatePreviewBug_form(&$node) {
$form['title'] = array(
'#type'=> 'date',
'#title' => t('Test Date'),
'#required' => TRUE,
);
return $form;
}
function DatePreviewBug_view(&$node, $teaser, $page) {
$node->body .= theme('DatePreviewBug_view', $node);
}
function theme_DatePreviewBug_view($node) {
$output = 'Test Date: ' . date('l, F d, Y', $node->title);
return $output;
}
?>
Once installed, go to: node/add/DatePreviewBug, change the "Test Date" to a different date, then hit the "preview" button. You'll (hopefully!) see that the entered date is ignored in the preview.
If someone can confirm that my test module is set up correctly and this really is a bug, then I'll go ahead and submit a bug report.