Passing next and previous date using jquery
Im trying to wrap my head around this, using Jquery I want to browse a list of events by date. Im calling the php that gives me back results via jquery ajax call. I want to have 2 links that allow me to move forward in the date and the other link lets me go back in the date based on the current date being used and pass it to the php page to grab all results for that date.
So for example the default date is today, then I can click a link that will get the next day date and pass it to the php page via aja开发者_StackOverflow中文版x. Then if I click the arrow again it will get the next day and so on. Can anyone point me in the right direction to do this?
I think the easier way is to convert your date in a timestamp and send it to js => php, or php => js.
Look the Date object in js, and the date object in php. You can easily convert a timestamp to a date and a date to a timestamp.
精彩评论