Index: /branches/version-2_12-multilang/data/Smarty/templates/admin/products/review.tpl
===================================================================
--- /branches/version-2_12-multilang/data/Smarty/templates/admin/products/review.tpl	(revision 22291)
+++ /branches/version-2_12-multilang/data/Smarty/templates/admin/products/review.tpl	(revision 22357)
@@ -25,5 +25,14 @@
 <script type="text/javascript">
 $(function(){
-	
+	var dateFormat = $.datepicker.regional['<!--{$smarty.const.LANG_CODE}-->'].dateFormat;
+
+    <!--{if $arrForm.search_startyear != '' && $arrForm.search_startmonth != '' && $arrForm.search_startday != ''}-->
+    var search_startyear  = '<!--{$arrForm.search_startyear|h}-->';
+    var search_startmonth = '<!--{$arrForm.search_startmonth|h}-->';
+    var search_startday   = '<!--{$arrForm.search_startday|h}-->';
+    var search_start_ymd = $.datepicker.formatDate(dateFormat, new Date(search_startyear, search_startmonth - 1, search_startday));
+    $("#datepickersearch_start").val(search_start_ymd);
+    <!--{/if}-->
+
 	$( "#datepickersearch_start" ).datepicker({
 	beforeShowDay: function(date) {
@@ -38,5 +47,8 @@
 	,changeYear: 'true'
 	,onSelect: function(dateText, inst){
-		setDatesearch_start(dateText);
+        var year  = inst.selectedYear;
+        var month = inst.selectedMonth + 1;
+        var day   = inst.selectedDay;
+        setDatesearch_start(year + '/' + month + '/' + day);
 	},
 	showButtonPanel: true,
@@ -45,9 +57,34 @@
 	});
 	
-	$("#datepickersearch_start").blur( function() {
-		var dateText = $(this).val();
-		setDatesearch_start(dateText);
+	$("#datepickersearch_start").change( function() {
+        var dateText   = $(this).val();
+        var dateFormat = $.datepicker.regional['<!--{$smarty.const.LANG_CODE}-->'].dateFormat;
+        // console.log(dateText);
+        // console.log(dateFormat);
+        var date;
+        var year  = '';
+        var month = '';
+        var day   = '';
+        try {
+            date = $.datepicker.parseDate(dateFormat, dateText);
+            year  = date.getFullYear();
+            month = date.getMonth() + 1;
+            day   = date.getDay();
+        } catch (e) {
+            // console.log(e);
+            // clear date text
+            $(this).val('');
+        }
+        setDatesearch_start(year + '/' + month + '/' + day);
 	});
-	
+
+    <!--{if $arrForm.search_endyear != '' && $arrForm.search_endmonth != '' && $arrForm.search_endday != ''}-->
+    var search_endyear  = '<!--{$arrForm.search_endyear|h}-->';
+    var search_endmonth = '<!--{$arrForm.search_endmonth|h}-->';
+    var search_endday   = '<!--{$arrForm.search_endday|h}-->';
+    var search_end_ymd = $.datepicker.formatDate(dateFormat, new Date(search_endyear, search_endmonth - 1, search_endday));
+    $("#datepickersearch_end").val(search_end_ymd);
+    <!--{/if}-->
+    
 	$( "#datepickersearch_end" ).datepicker({
 	beforeShowDay: function(date) {
@@ -62,5 +99,8 @@
 	,changeYear: 'true'
 	,onSelect: function(dateText, inst){
-		setDatesearch_end(dateText);
+        var year  = inst.selectedYear;
+        var month = inst.selectedMonth + 1;
+        var day   = inst.selectedDay;
+        setDatesearch_end(year + '/' + month + '/' + day);
 	},
 	showButtonPanel: true,
@@ -70,6 +110,23 @@
 	
 	$("#datepickersearch_end").blur( function() {
-		var dateText = $(this).val();
-		setDatesearch_end(dateText);
+        var dateText   = $(this).val();
+        var dateFormat = $.datepicker.regional['<!--{$smarty.const.LANG_CODE}-->'].dateFormat;
+        // console.log(dateText);
+        // console.log(dateFormat);
+        var date;
+        var year  = '';
+        var month = '';
+        var day   = '';
+        try {
+            date = $.datepicker.parseDate(dateFormat, dateText);
+            year  = date.getFullYear();
+            month = date.getMonth() + 1;
+            day   = date.getDay();
+        } catch (e) {
+            // console.log(e);
+            // clear date text
+            $(this).val('');
+        }
+        setDatesearch_end(year + '/' + month + '/' + day);
 	});
 
@@ -167,13 +224,17 @@
                     <span class="attention"><!--{$arrErr.search_endyear}--></span>
                 <!--{/if}-->
-                <input id="datepickersearch_start" type="text" value="<!--{if $arrForm.search_startyear != "" && $arrForm.search_startmonth != "" && $arrForm.search_startday != ""}--><!--{$arrForm.search_startyear|h}-->/<!--{$arrForm.search_startmonth|h|string_format:'%02d'}-->/<!--{$arrForm.search_startday|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_startyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
-                <input type="hidden" name="search_startyear" value="<!--{$arrForm.search_startyear}-->" />
-                <input type="hidden" name="search_startmonth" value="<!--{$arrForm.search_startmonth}-->" />
-                <input type="hidden" name="search_startday" value="<!--{$arrForm.search_startday}-->" />
+                <input id="datepickersearch_start"
+                       type="text"
+                       value="" <!--{if $arrErr.search_startyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
+                <input type="hidden" name="search_startyear" value="<!--{$arrForm.search_startyear|h}-->" />
+                <input type="hidden" name="search_startmonth" value="<!--{$arrForm.search_startmonth|h}-->" />
+                <input type="hidden" name="search_startday" value="<!--{$arrForm.search_startday|h}-->" />
                 <!--{t string="-"}-->
-                <input id="datepickersearch_end" type="text" value="<!--{if $arrForm.search_endyear != "" && $arrForm.search_endmonth != "" && $arrForm.search_endday != ""}--><!--{$arrForm.search_endyear|h}-->/<!--{$arrForm.search_endmonth|h|string_format:'%02d'}-->/<!--{$arrForm.search_endday|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_endyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
-                <input type="hidden" name="search_endyear" value="<!--{$arrForm.search_endyear}-->" />
-                <input type="hidden" name="search_endmonth" value="<!--{$arrForm.search_endmonth}-->" />
-                <input type="hidden" name="search_endday" value="<!--{$arrForm.search_endday}-->" />
+                <input id="datepickersearch_end"
+                       type="text"
+                       value="" <!--{if $arrErr.search_endyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
+                <input type="hidden" name="search_endyear" value="<!--{$arrForm.search_endyear|h}-->" />
+                <input type="hidden" name="search_endmonth" value="<!--{$arrForm.search_endmonth|h}-->" />
+                <input type="hidden" name="search_endday" value="<!--{$arrForm.search_endday|h}-->" />
             </td>
         </tr>
