This example shows using ajax request to get data and preload the images.
Note images could be loaded in div which have a style "display:none" however certain browsers like opera do not load hidden images for the sake of performance.
The script highlights entire week starting from the selected date. The input however is populated as the selected date. I have attached the datepicker to a div for an "allways show" effect.