Hello Reader's. If you have given a date and you just need to add or subtract number of days from it then you can use the code below:-
var SubDays = 15;
$.datepicker.formatDate('yy/mm/dd', new Date() - SubDays) ;
Or you can also calculate as follows:-
new Date(new Date().setDate(new Date().getDate()-5))
0 Comment(s)