parmarmayur9090 / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

Render the selected dates for Multi month date picker #368

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Kelvin,
I am just trying  to highlight whatever user previously select dates when page 
is loaded.
My code is :
var selectedDate = "";
 $(document).ready(function () {
    $(function () {
      $('#datepickerdiv').datePickerMultiMonth(
{
  numMonths: 3,
  inline: true,
  selectMultiple: true,
  renderCallback: function ($td, thisDate) {

    if (Need help here) {
      $td.addClass('blackoutDates');

    }
  }
}
).bind(
'dateSelected',
function (event, dates, $td, status) {
  selectedDate += dates.asString() + " ";
  alert(selectedDate);

}
)
 });
  });

I am garbing the selected dates by user into selectedDate variable.So can you 
help me to highlight that selected dates.

My css:

<style type="text/css">
#datepickerdiv {
border: 2px solid #000;
overflow: auto;
float: left;
}
.dp-applied {
float: left;
}
table.jCalendar {
border: none;
}
.dp-popup-inline {
height: 160px;
}

table.jCalendar td.blackoutDates,table.jCalendar td.blackouDates:hover
{
  background:white;
  color:Red
}
</style> 

Thanks
Sabin

Original issue reported on code.google.com by pradhan....@gmail.com on 27 Mar 2013 at 5:52