DMXzone Calendar 2 Support Product Page

Dynamic block reserved date not work.

Asked 21 Nov 2013 08:42:59
1
has this question
21 Nov 2013 08:42:59 Jean Pierre Valls posted:
Hello,
Since the last version of Calendar 2, I can no longer coloring book the dates in the calendar.
This manipulation I've done with the previous version without problem.
My sql:
----------------------------------
SELECT date_db, date_df,paye
FROM contrat,paye
WHERE contrat.acc_paye=paye.paye_id
------------------------------------
My Code:
-------------------------
<div class="dmxCalendar2" id="dmxCalendar21"></div>
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(
function()
{
jQuery("#dmxCalendar21".dmxCalendar2(
{"altFormat": "yy-mm-dd", "displayInline": true, "numberOfMonths": [2, 3], "condFormat": "yy-mm-dd", "condDates": [<?php
do {
?> <?php if ($row_Recordset1['paye']=='Oui') { ?>, {"date": "<?php echo dmxCalendarFormat($row_Recordset1['date_db'], "yy-mm-dd" ; ?>", "till": "<?php echo dmxCalendarFormat($row_Recordset1['date_df'], "yy-mm-dd" ; ?>", "cls": "reserver", "tooltip": "", "enabled": false}, <?php } ?>, <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>], "firstDay": 1, "showOn": "both", "duration": "slow", "showOptions": {"direction": "up", "easing": "swing"}, "yearRange": "c-10:c+10"}
);
}
);
// ]]>
</script>
----------------------------------
I work on Mac OS X 10.9 and Dreamweaver CC
Do you have any idea why it does not work?
Regards
JPierre

Replies

Replied 21 Nov 2013 08:52:00
21 Nov 2013 08:52:00 Jean Pierre Valls replied:
Hello,
I Locate a solution:
My sql:
$query_Recordset1 = "SELECT date_db, date_df,paye FROM contrat,paye WHERE contrat.acc_paye=paye.paye_id and paye.paye='Oui'";

My Code :
<div class="dmxCalendar2" id="dmxCalendar21"></div>
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(
function()
{
jQuery("#dmxCalendar21".dmxCalendar2(
{"altFormat": "yy-mm-dd", "displayInline": true, "numberOfMonths": [2, 3], "condFormat": "yy-mm-dd", "condDates": [<?php
do {
?> {"date": "<?php echo dmxCalendarFormat($row_Recordset1['date_db'], "yy-mm-dd" ; ?>", "till": "<?php echo dmxCalendarFormat($row_Recordset1['date_df'], "yy-mm-dd" ; ?>", "cls": "reserver", "tooltip": "Indisponible", "enabled": false, "cond": ""}, <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>], "firstDay": 1, "showOn": "both", "duration": "slow", "showOptions": {"direction": "up", "easing": "swing"}, "yearRange": "c-10:c+10"}
);
}
);
// ]]>
</script>

-------
I removed the condition (Formatting / Condition) in Calendar 2
And it works
Regards
JPierre

Reply to this topic