- Messages
- 1,682
- Reaction score
- 32
- Points
- 48
well im using this script right here:
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/
and I have a multiMonth(http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth3.html) plugin and multiple select enabled(http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html).
I want to be able to on load have certain dates already selected and those dates come from a database.
I found two possible clues to help me out, but since I have not strictly learned JS yet, I can not made heads or tails.
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendarBankHolidays.html
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerDefaultToday.html
here's the code right now im using:
and this part is not being selected, I took it from the select todays date demo
and as a bonus, if anyone has any ideas to speed up the load, because right now the page takes forever to load, and I don't have anything to show any progress, so the end user might think the thing is broken.
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/
and I have a multiMonth(http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth3.html) plugin and multiple select enabled(http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html).
I want to be able to on load have certain dates already selected and those dates come from a database.
I found two possible clues to help me out, but since I have not strictly learned JS yet, I can not made heads or tails.
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendarBankHolidays.html
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerDefaultToday.html
here's the code right now im using:
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);
})[COLOR=Red].val(
new Date().asString()).trigger('change');[/COLOR]
jQuery('#getSelected').bind(
'click',
function(e) {
alert(jQuery('#multimonth').dpmmGetSelected());
return false;
});
});
</script>
Code:
.val(new Date().asString()).trigger('change');
and as a bonus, if anyone has any ideas to speed up the load, because right now the page takes forever to load, and I don't have anything to show any progress, so the end user might think the thing is broken.