Hi all,
Showing Next and Previous date of current date using Jquery.Biggest problem that you may find doing this will be date-time format.
var nextDayDate = $("#<%=txtDate.ClientID%>").datepicker('getDate', '+1d');
debugger;
nextDayDate.setDate(nextDayDate.getDate() + 1);
//alert(nextDayDate);
nextDayDate=nextDayDate.localeFormat('MM/dd/yyyy');
$("#<%=lblNxt.ClientID%>").text(nextDayDate);
var PreVDayDate = $("#<%=txtDate.ClientID%>").datepicker('getDate', '+1d');
PreVDayDate.setDate(PreVDayDate.getDate() -1);
PreVDayDate =PreVDayDate.localeFormat('MM/dd/yyyy');
$("#<%=lblPrev.ClientID%>").text(PreVDayDate);
If u had any trouble just ask,
Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding
:)
1 comment:
fine statement of JQuery.
Web design London
Post a Comment