DatePicker - Just Display Date Range

DatePicker - Just Display Date Range

Hi Guys,

I am trying to use Datepicker to just display a range of dates and I have pretty much got it sorted. My only problem is that people are still able to click the dates and change the css style so it ruins the range I am displaying to user. 

Here is what I have so far, it stops the calendar from closing and marks out the dates I need, I just can't disable people from being able to click the dates and altering the CSS styles:

  1. $(function(){
    $('input').checkBox();
    $('#datepickerInput').datepicker({
    inline: true,
    minDate: new Date(2011,11,9),
    maxDate: new Date(2011,12,31),
    showButtonPanel: true,
    numberOfMonths: 3,
    onSelect: function(dateText, inst) {inst.stayOpen = true;},
    beforeShow: function(input, inst){inst.dpDiv.css({marginTop: '-180px', marginLeft: '-100px'});}
    });
    });  
    • Topic Participants

    • joe