From 1240467033525f21aaabf69bf4f8a8dec1fc91f5 Mon Sep 17 00:00:00 2001 From: Normann Lou Date: Tue, 17 Jul 2012 13:27:24 +1200 Subject: [PATCH] BUGFIX: when use 'showcalendar', both 'dateformat' and 'datavalueformat' need to be set to the right format as well so that DateField save the right value into DB --- code/SiteTreeContentReview.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/SiteTreeContentReview.php b/code/SiteTreeContentReview.php index eb1663e..528ef02 100644 --- a/code/SiteTreeContentReview.php +++ b/code/SiteTreeContentReview.php @@ -42,7 +42,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider DateField::create( "NextReviewDate", _t("SiteTreeCMSWorkflow.NEXTREVIEWDATE", "Next review date (leave blank for no review)") - )->setConfig('showcalendar', true), + )->setConfig('showcalendar', true)->setConfig('dateformat', 'yyyy-MM-dd')->setConfig('datavalueformat', 'yyyy-MM-dd'), new DropdownField("ReviewPeriodDays", _t("SiteTreeCMSWorkflow.REVIEWFREQUENCY", "Review frequency (the review date will be set to this far in the future whenever the page is published.)"), array( 0 => "No automatic review date",