Closed (fixed)
Project:
Webform
Version:
6.x-3.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2010 at 18:29 UTC
Updated:
10 Nov 2010 at 03:59 UTC
Hi there, quick question. I've searched the issues and all of drupal relentlessly and haven't gotten anything.
I have a date field and the input is rendering as YYYY/DD/MM
I want to change it to MM/DD/YYYY, I've tried to hack the code and have also messed with my date formatting, and they're all in mm/dd/yyyy in one way or another. How can I change the format in which the order in which the select fields are rendered?
any help is much, much appreciated.
A
Comments
Comment #1
quicksketchWebform expands the date using the Drupal core function expand_date (http://api.lullabot.com/expand_date) which determines the display order based on the "short" date format. If you adjust your short date format, Webform's form elements should render the date field to match it (assuming that the "short" date has all the necessary parts of month, day, and year).
Comment #2
quicksketchI've double-checked that this and it still works as expected. Just update your site's "Short" format at admin/settings/date-time and Webform should match that format when displaying date fields.
Comment #3
gamelodge commentedI would like to remove Day from my form so all I have is month/year, I have tried changing the short format to suit this but it still shows day... how should i go about removing 'day'
Comment #4
quicksketchThis is not possible with Webform and is not related to this request. If you're doing credit cards (sounds like a likely guess), try http://drupal.org/project/webform_pay.
Comment #5
gamelodge commentedThanks quicksketch
I might give that a try next time.
For those interested here is what I did to get it working.