Skip to content

Instantly share code, notes, and snippets.

@kevbook
Last active April 29, 2018 17:56
Show Gist options
  • Save kevbook/7511b84d4cf41ece64fe416c4c1abeb9 to your computer and use it in GitHub Desktop.
Save kevbook/7511b84d4cf41ece64fe416c4c1abeb9 to your computer and use it in GitHub Desktop.
React challenge

React Component - Create a standard monthly calendar component using React with these minimum requirements:

  1. The monthly calendar should label the day of the month (as a number) in a fixed 6 x 7 grid (6 rows and 7 columns).
    • All the cells of the grid should have borders
  2. Each row starts with Sunday (column 0) and ends with Saturday (column 6).
    • Add a heading above each column to represent the day of the week. (eg. Sun, Mon, Tues, ...etc)
  3. Ensure that every cell in the grid displays a number.
    • For example, the currenly selected month is May 2018.
    • May 1, 2018 is a Tuesday.
    • For row 0, column 0 show April 29. For row 0, column 1 show April 30.
  4. Set a disctint style for the currently selected month so that it stands out from cells that are outside of the currently selected month.
  5. Add a Heading to the calender showing the currently selected month.
  6. Add a button to go back to the previous month
  7. Add a button to go forward to the next month
  8. Make each day clickable. Open an alert box showing the date that was clicked.
    • Add a border style to the currently clicked day.
    • Ensure that only one day has the border style applied.
  9. Feel free to use any design you wish and to add any enhancements you feel will lead to a better user experience.
  10. The default selected month should be the current month.

Send your project with instructions for how to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment