0

IF module's field type is date, then in module's grid if I filter with date, to date value's record are not shown as result in grid.

For example I have generated 3 shopping cart price rule, with date range of 2nd October to 4th October start date. enter image description here

If I filter with From date 2nd October and To date 4th October , How ever 4th October has result. It is not shown in grid.

enter image description here

This issue happens in magento 1.9 's Shopping Cart Price Rules grid. I have not add any extension for this promotion rule.

If any one has solve this issue, can you please help me?

1

I have solved this issue my self, for that overwrite in local folder \Mage\Adminhtml\Block\Widget\Grid\Column\Filter\Date.php

Comment line $dateObj->setTimezone(Mage_Core_Model_Locale::DEFAULT_TIMEZONE); from protected function _convertDate() function.

0

your magento locale settings have some error with date. If you are using en_us locale then change the date format for both short and long in this file

lib/Zend/Locale/Data/en.xml

You will find something like this

<dateformatlength type="short">
    <dateformat>
        <pattern>M/d/yy</pattern>
    </dateformat>
</dateformatlength>

and above this for the full

<dateFormatLength type="full">
    <dateFormat>
        <pattern>EEEE, MMMM d, y</pattern>
    </dateFormat>
</dateFormatLength> 

put same format for all and your problem will be resolved. For reference link

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.