Chapter 10: Calendar
Overview
In this chapter you see how to mark up and style a calendar. This is based on a personal project that lets a user assign events to dates by clicking dates on a calendar. You can use the techniques in this chapter to create a static calendar, which you must create manually, or to create your own more sophisticated calendar that is generated by a server-side language such as PHP, Perl, Java, and so on, or even client-side JavaScript.
The following are the goals of the calendar project:
The user must be able to quickly and easily navigate to any calendar date, so controls must exist for going to the next and previous months, in addition to a feature that allows a user to go directly to any date.
The application must facilitate the retrieval of dates in Unix timestamps, a format that measures time as the number of seconds elapsed since the Unix Epoch (January, 1, 1970 00:00:00 GMT). Because Unix timestamps are a requirement, and some platforms have difficulty retrieving Unix timestamp values before the Unix Epoch and after January 19, 2038, the application will only support years in that range (at least for this implementation). This application doesn't actually generate these timestamps, but must include them somewhere in the id or class name naming conventions.
The application must show events the user has entered by coloring days on the calendar. If users move their mouse cursor over a date, the details of the event are revealed.
The next section describes some of the details of the project design that must be considered.
No comments:
Post a Comment