- NRCsupportAsked 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).
- JotForm Supportashwin_dAnswered on March 04, 2014 at 11:22 AM
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.
- NRCsupportAnswered on March 04, 2014 at 11:52 AM
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.
- EliezerNAnswered on March 04, 2014 at 02:45 PM
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
- NRCsupportAnswered on March 04, 2014 at 05:20 PM
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?
- JotForm SupportTitusNAnswered on March 04, 2014 at 08:28 PM
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.
- NRCsupportAnswered on March 05, 2014 at 05:43 PM
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.