Jump to content

Products and Orders datetime filter not working


Recommended Posts

Datetime filter of products and orders on admin are not working

 

Finally, I found in admin/themes/default/template/helpers/list/list_header.tpl

My code is like this


$(function() {
	var dateStart = parseDate($("#{$params.id_date}_0").val());
	var dateEnd = parseDate($("#{$params.id_date}_1").val());
	$("#local_{$params.id_date}_0").datepicker({
		altField: "#{$params.id_date}_0"
	});
	$("#local_{$params.id_date}_1").datepicker({
		altField: "#{$params.id_date}_1"
	});
	if (dateStart !== null){
		$("#local_{$params.id_date}_0").datepicker("setDate", dateStart);
	}
	if (dateEnd !== null){
		$("#local_{$params.id_date}_1").datepicker("setDate", dateEnd);
	}
});

But, codes should be this

$(function() {
	var dateStart = parseDate($("#{$params.id_date}_0").val());
	var dateEnd = parseDate($("#{$params.id_date}_1").val());
	$("#local_{$params.id_date}_0").datepicker(
		"option", "altField", "#{$params.id_date}_0"
	);
	$("#local_{$params.id_date}_1").datepicker(
		"option", "altField", "#{$params.id_date}_1"
	);
	if (dateStart !== null){
		$("#local_{$params.id_date}_0").datepicker("setDate", dateStart);
	}
	if (dateEnd !== null){
		$("#local_{$params.id_date}_1").datepicker("setDate", dateEnd);
	}
});

I am sure I downloaded v1.6.0.9

Why did it happen? Anyone else?

Link to comment
Share on other sites

×
×
  • Create New...