javascript - select by default previous date with jquery calendar -
i have datepicker codes below display me calendar, current date selected default, select previous date default instead (the day before today). have tried failed can me please?
$(function() { $("#datepicker").datepicker({ dateformat: "yy-mm-dd" }).val() });
i resolved issue way
$(function() { $("#datepicker").datepicker({ dateformat: "yy-mm-dd" }).val(); $("#datepicker").click(function() { date = new date(); date.setdate(date.getdate()-1); $( "#datepicker" ).datepicker( "setdate" , date); }); });
Comments
Post a Comment