The used date format in the form element differs from the format used in the theme function.

The theme_webform_display_date() in components/date.inc uses the 'medium' format, while all other webform_date_format() implementations in this module uses 'short'.

Comments

michaelmol’s picture

Title: Differerent date formats used in components/date.inc » Date formats inconsistent in components/date.inc
michaelmol’s picture

Status: Active » Needs review
StatusFileSize
new621 bytes
quicksketch’s picture

Category: Bug report » Task

Thanks, I don't think this is a bug and it's probably intentional. Different formats are typically used based on the amount of space available to display that format, and in the case of a date component's value, there is usually plenty of room.

That said, all of the use of the "short" or "medium" date formats is planned on being removed and just made into a site-wide Webform setting in #1346536: Make submission date display formats configurable. Right now it's painfully unclear which format is being used, and even if we make it consistently use the short format, it's still not apparent that the short format would affect webforms.

So in the short term, I think including this patch would be okay since we'll be moving to a more consistent display of dates anyway, but long-term all use of the "short" format will be replaced with a webform-specific date format.

danchadwick’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#1346536: Make submission date display formats configurable

I think what we actually need is a single site-wide configuration option for date format, as suggested in #1346536: Make submission date display formats configurable. Therefore, I'm closing this as a duplicate.