//added check on range picker if date from is superior than date to

This commit is contained in:
Vincent Augagneur
2013-09-05 16:34:03 +02:00
parent e4932131f6
commit 4124a48b1e
@@ -215,7 +215,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
{ {
if (Tools::isSubmit('submitDatePicker')) if (Tools::isSubmit('submitDatePicker'))
{ {
if (!Validate::isDate($from = Tools::getValue('datepickerFrom')) || !Validate::isDate($to = Tools::getValue('datepickerTo'))) if ((!Validate::isDate($from = Tools::getValue('datepickerFrom')) || !Validate::isDate($to = Tools::getValue('datepickerTo'))) || (strtotime($from) > strtotime($to)))
$this->errors[] = Tools::displayError('The specified date is invalid.'); $this->errors[] = Tools::displayError('The specified date is invalid.');
} }
if (Tools::isSubmit('submitDateDay')) if (Tools::isSubmit('submitDateDay'))