javascript - Highlighting the dates between a start and end date in JQuery Datepicker -


i have 3 datepickers - have 1 datepicker shows 6 month span across top, , 2 date pickers beneath applied input fields. when input fields changed, want datepicker across top of webpage highlight start , end dates, , dates in between.

i have far been able highlight both start , end date can see in following code, i'd appreciate someones in how should go highlighting days in between.

    var $test = $.datepicker.formatdate('yy-m-d', $('#date-start').datepicker('getdate'));     var $test2 = $.datepicker.formatdate('yy-m-d', $('#date-end').datepicker('getdate'));      var dates1 = {};     dates1[$test] = 'first date';      var dates2 = {};     dates2[$test2] = 'second date';      $( "#calendar" ).datepicker({             firstday: 1,             numberofmonths: 6,             dateformat: 'yy-mm-dd',             beforeshowday: function(date) {             var search = date.getfullyear() + "-" + (date.getmonth() + 1) + "-" + (date.getdate());                      if (dates1[search]) {                        return [true, 'highlight', dates1[search] || ''];                     }                      if (dates2[search]) {                        return [true, 'highlight', dates2[search] || ''];                      }                      return [false, '', ''];              },             onselect: select_arrive,             mindate: '+' +minimumleaddays+ 'd',             onchangemonthyear: get_availability     }); 

thanks in advance!

edit: help, i'll take @ links , see if can figure out - again! :)

thanks everyone's help. found solution wanted here:

need highlight range of dates in jquery datepicker

it nice , simple follow, , hope helps else :)


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -