Time Zones - Page 2 - Post ID 297915

User 187934 Photo


Senior Advisor
20,239 posts

Not sure why it would be different once and a while. Might be the script on the prefill since its format is mm/dd/yy.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2836110 Photo


Registered User
109 posts

I also have noticed when the form loads, for a split second the date is MM/DD/YY and then it quickly changes over to DD/MM/YY

I will check the script,
User 2836110 Photo


Registered User
109 posts

I changed the script as follows:
Obviously have done something incorrectly.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script>var jQ = $.noConflict(true);
jQ( document ).ready(function() {
var currdate = new Date();
var currdate= currdate.getDate() + '/' (currdate.getMonth()+ 1) + '/' + + currdate.getFullYear();
jQ('input[name="Date"]').val(currdate);
});</script>
User 2836110 Photo


Registered User
109 posts

Sorry, correct script below.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script>var jQ = $.noConflict(true);
jQ( document ).ready(function() {
var currdate = new Date();
var currdate= currdate.getDate() + '/' + (currdate.getMonth()+ 1) + '/' + currdate.getFullYear();
jQ('input[name="Date"]').val(currdate);
});</script>
User 187934 Photo


Senior Advisor
20,239 posts

That looks correct. Try this. Which format do you have chosen in the Form Builder?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
var jQ = $.noConflict(true);
jQ( document ).ready(function() {
var currdate = new Date();
var currdate=currdate.getDate() + '/' +(currdate.getMonth()+ 1) + '/' + currdate.getFullYear();
jQ('input[name="Date"]').val(currdate);
});
</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 187934 Photo


Senior Advisor
20,239 posts

Looks like the form builders own scripts are altering the format after loading. I'll try a few things when I get a chance.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 187934 Photo


Senior Advisor
20,239 posts

Mine seems to work if I leave the script alone with the wrong format and choose the correct format in the Form Builder.
https://ericrohloff.com/coffeecup/ccfor … fill-date/
I see it switch the format when it loads but if I put the correct format in the script the input clears after load.
Not sure how to fix that at the moment.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2836110 Photo


Registered User
109 posts

Yep, that's exactly what i get also.
I do not see that as a big problem on the form.
I just don't understand why it sometime changes the date in the csv file to the incorrect format.
Maybe its a bug in WFB ??
User 187934 Photo


Senior Advisor
20,239 posts

I found a way to make it work. The time zone script is in there also. If you don't need it on this form delete it.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>var jQ = $.noConflict(true);
jQ( document ).ready(function() {
var currdate = new Date();
var currdate=currdate.getDate() + '/' +(currdate.getMonth()+ 1) + '/' + currdate.getFullYear();
jQ('input[name="timezone"]').val(Intl.DateTimeFormat().resolvedOptions().timeZone);
setTimeout(
function()
{
jQ('input[name="Date"]').val(currdate);
}, 500);
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2836110 Photo


Registered User
109 posts

On Initial testing it seems to work.
I will test it further over the next few days and see if there are any Date Format mismatches in the csv file.
Thanks again Eric.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.