javascript - get date from today to weekend -


i have 1 datepicker function , there small code:-

$('ul li').click(function(){     var dat = $.datepicker.formatdate('yy/mm/dd', new date());     $('#date').append(dat); }) 

this html:-

<div> <ul> <li>this weekend</li></ul></div> <p id="date">  </p> 

my try demo jsfiddle : - http://jsfiddle.net/pmmkc/1/
here try click on li this weekend want date today weekend.
don't know how work.
please me out this.
thanks.

try

$('ul li').click(function(){     var date = new date();     var day = date.getday();     while(day < 7){         $('#date').append($.datepicker.formatdate('yy/mm/dd', date));         date.setdate(date.getdate() + 1);         day++;     } }) 

demo: fiddle


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -