en.javascript.info/2-ui/1-document/07-modifying-document/9-calendar-table/task.md
Ilya Kantor dbf5c7587c minor
2017-03-13 00:21:00 +03:00

17 lines
591 B
Markdown

importance: 4
---
# Create a calendar
Write a function `createCalendar(elem, year, month)`.
The call should create a calendar for the given year/month and put it inside `elem`.
The calendar should be a table, where a week is `<tr>`, and a day is `<td>`. The table top should be `<th>` with weekday names: the first day should be Monday, and so on till Sunday.
For instance, `createCalendar(cal, 2012, 9)` should generate in element `cal` the following calendar:
[iframe height=210 src="solution"]
P.S. For this task it's enough to generate the calendar, should not yet be clickable.