How to set Date in dd.mm.yyyy format with inputtype: date and datepicker?

Hello Planetpress,

I have a problem with the date in the webform, after I fill the the form with the Capture on the go App and pick the date with the datepicker, the datepicker is showing the right format in dd.mm.yyyy but the date data is saved in the yyyy-mm-dd format. I unsuccessfully tried to change the format of the xml date Tag, my record data for the date doesnt work after that.

Then I changed the locale to german, that didnt worked either. After that I wrote my own script for the print version, there it worked, but my problem is now that the script for the webform is not working, there is only the expression: results.attr(‘value’,record.fields.WV_Von); working, I cant put my own script in there?

Can you help me please?

I have the Planetpress Connect Designer Version 1.3.0.30880

best regards yk

Good Afternoon Jk,

To change your date format you can try this:

  1. You have to go to on the JavaScript folder and modify the cotg-1.1.0.js file and give the correct format to your date variable as on the picture below

you have to use this code:

result += day < 10 ? “0” + day : day;
result += “-”;
result += month < 10 ? “0” + month : month;
result += “-”;
result += year;

and let me know if its works for you.

Hello Juan,

thank you for your answer, I changed the code like you said, but it didnt worked.

There is one difference on the cotg file, my version of that file is cotg-1.0.0.js not like yours cotg-1.1.0.js do I need the newer version of that file?

Is there another way to save the date in the right format?

Thank you for your help.

Hi Yk,

I recommend to you to work with the PlanetPress Connect latest version.

You have to uninstall your current version and install the latest version, to download and install the latest version of PlanetPress Connect you can go to http://planetpress.objectiflune.com/en/resources/support and select the off-line version.

Best Regards,

Juan

Hi Juan,

I have updated to the latest version, but the Problem is not gone.

I have a question regarding the datepicker, have the cotg app its own datepicker? If so how do I use it? I used before the innate html input type=“date” datepicker, but that didnt work.

I have another Problem, after the update on one of my forms the signatures dont work on the cotg app, other forms are functioning and I dont know why I checked the sourcecode, it is like before.

Best Regards,

YK

HI Yk,

In your case you must use a COTG element, the Date format; In Connect Design we have specials elements for COTG that use the cotg-1.1.0.js as I describe on the picture below.

For the signature problem, Do you mean that tapping the Signature box doesn’t do anything, or it just doesn’t appear?

Best Regards,

Juan