Forums

Calendar Input Field in a Repeater Group Issue (CF7)

CraigH 11 Jan, 2024
I have a Chronoforms form calendar input field within a repeater group which is setup to type=Date, Start Mode=YEAR Display format=YYYY-MM-DD.
This works fine on the predefined cloned instances present when the form is loaded. However, if I add more clones with an "add clone" event button, the calendar input field in the dynamically added clones starts off on Day selection and has a display format of YYYY-MM-DD HH:mm:ss and forces the user to select a time of day. Ie it has all what I expect are default values and does not use the settings configured in the form builder.

Environment is:
Joomla 5.0.2
Chronoforms: 7.0.12
PHP 8.2
CraigH 11 Jan, 2024
It seems the function responsible for applying the calendar input field settings is "$.G3.boot.calendar" in ~/plugins/system//chronog3_plg/chronog3/assets/js/g3.boot.js.

By experiment I have found that changing line 63 from:
Container.find('[data-calendar]').not('[data-g3]').attr('data-g3', 1).each(function(i, calfield){


to:
Container.find('[data-calendar]').attr('data-g3', 1).each(function(i, calfield){


seems to resolve the problem without introducing any issues on my form tests. Not sure how good a fix this is for the issue I was experiencing.
You need to login to be able to post a reply.