Possible Duplicate:
Can the jQuery UI Datepicker be made to disable Saturdays and Sundays (and holidays)?
i will get a set of dates from the database. i have to enable only those dates in jQuery calendar. How can i do it ?
Possible Duplicate:
Can the jQuery UI Datepicker be made to disable Saturdays and Sundays (and holidays)?
i will get a set of dates from the database. i have to enable only those dates in jQuery calendar. How can i do it ?
Check out this datepicker http://davidwalsh.name/jquery-datepicker-disable-days
You could use this jQuery plugin which makes use of jQuery-UI's date picker
http://balupton.com/sandbox/jquery-sparkle/demo/#eventcalendar
Just query your database and return a JSON object in this format
{
"entries": [
{
"id": 1,
"title": "My First Entry",
"start": "2010-07-14 11:11:00",
"finish": "2010-07-14 14:23:18",
"user": {
"name": "Joe"
}
},
{
"id": 2,
"title": "My Second Entry",
"start": "2010-07-14 11:11:00",
"finish": "2010-07-15 14:23:18",
"user": {
"name": "Joe"
}
}
]
}
then just add it as an option to the plugin:
$eventCal.EventCalendar({
// Ajax Variables
/** The JSON variable that will be return on the AJAX request which will contain our entries */
ajaxEntriesVariable: 'entries',
/** The AJAX url to request for our entries */
ajaxEntriesUrl: './eventcalendar.json'
});