From 83f7077ec930952cdc9cfc8982b80cd4dad06b5f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 07 Jan 2013 08:21:25 -0500
Subject: [PATCH] Fix searching by date in address book (#1488888)

---
 program/steps/addressbook/search.inc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc
index 8513250..bbd9b9a 100644
--- a/program/steps/addressbook/search.inc
+++ b/program/steps/addressbook/search.inc
@@ -300,9 +300,13 @@
             $label    = isset($colprop['label']) ? $colprop['label'] : rcube_label($col);
             $category = $colprop['category'] ? $colprop['category'] : 'other';
 
-            if ($ftype == 'text')
+            // load jquery UI datepicker for date fields 
+            if ($colprop['type'] == 'date')
+                $colprop['class'] .= ($colprop['class'] ? ' ' : '') . 'datepicker';
+            else if ($ftype == 'text')
                 $colprop['size'] = $i_size;
 
+
             $content  = html::div('row', html::div('contactfieldlabel label', Q($label))
                 . html::div('contactfieldcontent', rcmail_get_edit_field('search_'.$col, '', $colprop, $ftype)));
 

--
Gitblit v1.9.1