From ff3e590d2f6619dcc5263f7b0b5282bbad1df235 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 29 Jul 2013 23:33:38 -0700 Subject: [PATCH] future/past classNames on day cells --- src/agenda/AgendaView.js | 6 ++ src/basic/BasicView.js | 6 ++ tests/past_future_classNames.html | 103 ++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 tests/past_future_classNames.html diff --git a/src/agenda/AgendaView.js b/src/agenda/AgendaView.js index 6e5d88a..d8d0f1f 100644 --- a/src/agenda/AgendaView.js +++ b/src/agenda/AgendaView.js @@ -388,6 +388,12 @@ function AgendaView(element, calendar, viewName) { 'fc-today' ); } + else if (date < today) { + classNames.push('fc-past'); + } + else { + classNames.push('fc-future'); + } cellHTML = "" + diff --git a/src/basic/BasicView.js b/src/basic/BasicView.js index 94b8065..dec59a2 100644 --- a/src/basic/BasicView.js +++ b/src/basic/BasicView.js @@ -266,6 +266,12 @@ function BasicView(element, calendar, viewName) { tm + '-state-highlight' ); } + else if (date < today) { + classNames.push('fc-past'); + } + else { + classNames.push('fc-future'); + } html += " + + + + + + + + + + + +
+ +