DMXzone Calendar 3 Support Product Page

Solved

Calandar 3 doesn't work with multiple update form

Reported 29 Jun 2016 09:57:55
1
has this problem
29 Jun 2016 09:57:55 MX Addict posted:
I create a Update Multiple Database Records page . I use Calandar 3 to assign dates to a date textfield. The only thing is it opens the calandar but doesn't assign a date to the textfield.

Replies

Replied 29 Jun 2016 10:05:54
29 Jun 2016 10:05:54 Teodor Kuduschiev replied:
Hello,
The calendar is not really meant to be used inside repeat regions, as its jQuery code uses IDs to identify the target input. jQuery markup does not allow usage of dynamic {{values}} within scripts, so you cannot assign a dynamic id to the calendar. This would require additional custom hand coding (not through UI) to be achieved.
Replied 29 Jun 2016 10:11:24
29 Jun 2016 10:11:24 MX Addict replied:
Hi Teodor,


QuoteThis would require additional custom hand coding (not through UI) to be achieved.


How can this be done?
Replied 29 Jun 2016 10:31:44
29 Jun 2016 10:31:44 Teodor Kuduschiev replied:
I will try to explain as simple as possible.
1. Add the calendar in the repeat region and adjust all of its settings through the UI
2. Change the calendar input to:
<input class="dmxCalendar2" name="dmxCalendar{{$number}}" id="dmxCalendar{{$number}}" />

3. CUT the script tag that is located below the calendar input and PASTE it in the head tags of your page.
4. Change the code that you just moved to:
<script type="text/javascript">
// <![CDATA[
function calendarInit()
{
jQuery(".dmxCalendar2").dmxCalendar2(
....calendar config code code goes here.....
);
}
// ]]>
</script>

5. Add this to your repeat region (or use the extended repeater onAfterrender event to add it):
data-binding-repeat-onafterrender="calendarInit();"


Must be working fine now.
Replied 29 Jun 2016 11:01:48
29 Jun 2016 11:01:48 MX Addict replied:
Hi Teodor,

It works fine now. Many thanks.

Maybe handy to write this in a manual for other clients.

When will the Server Connect Data binding extension be available and inserting/updating Null to date/time field
Replied 29 Jun 2016 11:06:04
29 Jun 2016 11:06:04 Teodor Kuduschiev replied:
Hello, i am happy to hear it works now. This is a situation which is too specific, and most of our users are "afraid" of code, so we prefer not scare them, that's why such "hacks" are not in the manuals.

As for the Server Connect Formatter extension - it will be released really soon.

Reply to this topic