From 33333001699aef1016677ee0d20e6de58ad4f815 Mon Sep 17 00:00:00 2001 From: Fazle Elahee Date: Tue, 29 Apr 2014 18:12:32 +0100 Subject: [PATCH] =?UTF-8?q?beforeShowDay=20option=20added.=20Iterate=20ove?= =?UTF-8?q?r=20each=20day=20before=20rendering=20calendar.=20Useful=20when?= =?UTF-8?q?=20highlight=20=20or=20disable=20day=20in=20calendar.=20=20or?= =?UTF-8?q?=20add=20custom=20class.=20example:=20datetimepicker({=20before?= =?UTF-8?q?ShowDay:=20function(=20date=20){=20return=20=E2=80=98my-custom-?= =?UTF-8?q?class=E2=80=99}=20});?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jquery.datetimepicker.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index 7844329..9574297 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -888,6 +888,11 @@ classes.push('xdsoft_weekend'); } + if(options.beforeShowDay && typeof options.beforeShowDay == 'function') + { + classes.push(options.beforeShowDay(start)) + } + table+=''+ '
'+d+'
'+ '';