Hello everyone,
i'm using a jquery datepicker like this:
<script type="text/javascript">
$(function() {
$('#inlineDatepicker').datepick({
rangeSelect: true,
monthsToShow: 3,
minDate: '+7d',
rangeSeparator: '|',
altField: '#resdate',
altFormat: 'dd-mm-yyyy',
pickerClass: 'locgrid',
onDate: nationalDays
}
);
});
var natDays = [[12, 18, 2010], [12, 19, 2010]];
function nationalDays(date, inMonth) {
if (inMonth) {
for (i = 0; i < natDays.length; i++) {
if (date.getMonth() + 1 == natDays[i][0] &&
date.getDate() == natDays[i][1] &&
date.getFullYear() == natDays[i][2]
) {
return {dateClass: natDays[i][3] + '_day', selectable: false};
}
}
}
return {};
}
</script>
now what i'm trying to accomplish is, when a user clicks a start- and enddate and there is a natDays variable in between to throw an error message.
any ideas?