What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
DateTime Single widget always displays the date in YYYYMMDD format and no way to change it.Asked by NRCsupport on March 04, 2014 at 09:56 AM
I have noticed an oddity, which actually is useful from my point of view. If I pass two date/time fields to the submission emails, one produced by a normal date/time field, and the other produced by the date/time single widget, they both come out in the same format, i.e. the one used in the date/time single widget.
This is despite the fact that on the original form the layouts of the two fields are totally different. Is this a known and deliberate feature or an accident that might disappear? I am keen to make use of this, but worried that one day the behaviour will suddenly change (as has recently happened with calculated fields).
Upon checking I found that there is currently no way to change the date format of the "DateTime Single" widget. I am not sure if this is done deliberately or is it a bug as it always displays the date format in YYYYMMDD format.
This can be best answered by our back end team. I am sending a information request to them. We will get back to you as soon as we have any update from them.
I actually like that format. What puzzles (and pleases) me is that in the submission emails, the normal date/time field also comes out in that format rather than the format in which the field is shown on the form.
Maybe this is an oddity with Firefox and is different on other browsers, since (on another thread) it has already been pointed out the date/time single field comesout differently from some other browsers.
Thanks for the clarification.
I made a test using a Date Time field and the DateTime Single widget, both with different formats:
I got the same result in Chrome and in FireFox. So, could you please confirm if this is the form you are talking about so that we can perform som tests? http://www.jotformpro.com/form/40503979576971
Yes, you are actually getting the effect that surprised me but is what I like.
The regular date/time field comes out in the email in the same layout as the single widget field, i.e with dashes instead of slashes between the parts of the date. I agree that the sequence of fields is as specified for the field.
Is there any way to get the normal date/time field to appear in that layout on the form, i.e. all in one block with dashes, rather than in individual blocks for each part with slashes between?
Yes there is.
Just request the server for part of the values by stripping the tag headers, then formatting exactly how you would like the date to appear:
Here's how it looks on the email :
You can add any character or spaces between the stripped tags.
Hope this helps.
Thanks. I am fairly happy about the emails. But it is where the normal date time field appears on the form that I would like to be able to get the fomat the same as for the date time single widget. I am going to start a new thread about this.