Week Selector

alt text

How to make such a line with arrows, where there will be dates by weeks from this array? And when choosing this week, these days were displayed. The arrows moved to the next and previous week.


Answer 1, authority 100%

In my opinion, dates are best used in the unix-timestampformat. Weeks are easy to calculate: 7 x 24 x 60 x 60 (7 days x 24 hours x 60 minutes x 60 seconds) = 604,800 seconds. This is your week.

Leave data transfer and response to ajax. If you really need it, I can share my implementation.