okay guys,
so I found out how to do it.
but now another problem arises.
I have a PHP script stuck into the JS code, im not sure if that is already the problem, but the PHP code draws dates out from the db.
Code:
<script type="text/javascript" charset="utf-8">
jQuery(function() {
jQuery('#multimonth').datePickerMultiMonth({
numMonths: 12,
inline: true,
selectMultiple: true,
startDate: '01/09/2009', // DD/MM/YY
month: 8, // 0=JAN 1=FEB ...
year: 2009
}).bind(
'dpMonthChanged',
function(event, displayedMonth, displayedYear) {
//uncomment if you have firebug and want to confirm this works as expected...
//console.log('dpMonthChanged', arguments);
}).bind(
'dateSelected',
function(event, date, jQuerytd, status) {
//uncomment if you have firebug and want to confirm this works as expected...
//console.log('dateSelected', arguments);
});
<?php
$sql = "SELECT * FROM nextsession";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
echo "jQuery('#multimonth').dpmmSetSelected('".date("d/m/y", $row[1])."'); \n";
}
?>
//jQuery('#multimonth').dpmmSetSelected('22/09/2009');
//jQuery('#multimonth').dpmmSetSelected('23/09/2009');
jQuery('#getSelected').bind(
'click',
function(e) {
alert(jQuery('#multimonth').dpmmGetSelected());
return false;
});
});
</script>
around the bottom you will see something like this
jQuery('#multimonth').dpmmSetSelected('22/09/2009');
the ones that are in comments are the ones that work
and the PHP ones doesn't