I would need this solution as well, please.
It can be seen here: http://www.chronoengine.com/component/chronoforums/posts/f2/t98613.html
Thank you an d best regards,
Andrew
Hi Andrew,
I suggest that you use one of the jQuery datepickers where you have more control over the datepicker settings.
Bob
Dear Bob,
Thank you very much for your fast answer! I was thinking about this solution but I would like to use a different kind of date picker what uses a different kind of date picker. It works by data attribute:
<input type="text" data-uk-datepicker="{format:'DD.MM.YYYY'}">
I have tried this https://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/3678-how-can-i-add-an-attribute-to-a-form-input.html
but it doesn't work for me. I have a JS bug. I am not an expert in JS yet, maybe I missed something. It says the window.addEvent function is not valid. I took your code into "On load" part's "Load JavaScript" box. Do you know what did I miss, please.
Thank You and best regards,
Andrew
Dear Bob,
Thank you for your answer.
The "from class to data attribute code" seems to me not working. I get this error code in Chrome browser even if I don't add any connected classes:
Uncaught TypeError: window.addEvent is not a function
I took your code in JS box to the top of "On load" part, above "HTML (Render Form)" box. What could cause this error message, please.
Hi Andrew,
That is a FAQ for CFv4 which used the MooTools JavaScript library. Current versions of Joomla! and ChronoForms use jQuery which is why the MooTools method window.addEvent is no longer working.
You don't need to use JavaScript to add an attribute in CFv5.
Bob
Dear Bob,
Thank you for your answer. I am so sorry for disturbed you. The "Extra params" field is for this job! Thank you and I beg your pardon! I hope this helps to others who switch of their brains for a moment.🙂