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
Post a Comment