ekseks -2 Junior Poster in Training

Here is a code I used for selecting the dates under my specified day (i.e. for all mondays of the month, tuesdays and so on. Take a look:

$('#dp1').datepick({multiSelect: 5, showTrigger: '#calImg',
       onShow: function(picker, inst) {
           var target = $(this);
           picker.find('div.datepick-month th span').each(function() {
               $('<a href="javascript:void(0)" class="' +
                       this.className + '" title="Select all of these days">' +
                       $(this).text() + '</a>').
                   click(function() {
                       var dates = $('div.datepick-month td:nth-child(' +
                           ($(this).parent().index() + 1) +
                           ') a:not(.datepick-other-month)', picker);
                       dates = dates.map(function(i, elem) {
                           return target.datepick('retrieveDate', this);
                       }).get();
                       target.datepick('clear').datepick('setDate', dates);
                   }).
                   replaceAll(this);
           });
       }
   });

So basically I am able to pick the dates for the whole day (i.e. Mondays the whole column selecting the dates). For a revision and my problem for now. I wanted to select not just one day but rather I could select the whole column for example having to choose 3 columns for example monday - wednesday -friday. To add, this code changes the dates in the textbox as I choose another column to make things clearer I want to choose the columns I needed. Next, as I pick a column I could also select individual dates in the datepicker the will be also just be, just be added in the textbox with the column and finally is that the datepicker shouldn't be closing as long as I dont click the close button in the datepicker :). Thanks