1) Use the
beforeShowDay callback to make today non-selectable. Then use CSS to style the date:
- var today = new Date();
- today.setHours(0, 0, 0, 0);
- $('#mydatepicker').datepicker({beforeShowDay: function(date) {
- return [date.getTime() != today.getTime(), ''];
- });
- .ui-datepicker-today span.ui-state-default { background: lime; }
2) The weekend dates have a class of
ui-datepicker-week-end on the
td, so you can restyle them with:
- .ui-datepicker-week-end a.ui-state-default { background: yellow; }