parmarmayur9090 / jquery-datepicker

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

Multi month, multi select and pre selected dates #352

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, im using multimonth and multiple select dates, and i just want to add pre 
selected dates, but i dont know how. Someone know how can i do?

thnks

Original issue reported on code.google.com by marianon...@gmail.com on 13 Jul 2012 at 1:52

GoogleCodeExporter commented 8 years ago
This is my code
$('#multimonth-new').datePickerMultiMonth({
        numMonths: 4,
        inline: true,
        selectMultiple:true
}).bind('dateSelected',function(e, selectedDate, $td, state){
    var date = new Date(selectedDate);
    var dia = (date.getYear()+1900)+"-"+ (date.getMonth()+1) +"-"+ date.getDate();
    if(state){
         $('.dias-new').append("<span id='dia' class="+dia+">"+dia+"</span>");
    }else{
         $('.'+dia).remove();
    }       
}
);
});

Original comment by marianon...@gmail.com on 13 Jul 2012 at 1:56

GoogleCodeExporter commented 8 years ago
You can use .dpmmSetSelected like in this example

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth4
.html

Original comment by kel...@kelvinluck.com on 13 Jul 2012 at 2:30

GoogleCodeExporter commented 8 years ago

Original comment by kelvin.l...@gmail.com on 13 Jul 2012 at 2:30

GoogleCodeExporter commented 8 years ago
thanks, i did it. :D

Original comment by marianon...@gmail.com on 13 Jul 2012 at 3:08