Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date range filter in admin ui grid displaying "Invalid date" after reload #13428

Closed
perryholden opened this issue Jan 30, 2018 · 15 comments
Closed
Labels
Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: done Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. stale issue

Comments

@perryholden
Copy link

Preconditions

  1. Magento 2.2.1
  2. PHP 7.0.26
  3. MySQL 5.6.38-83.0

Steps to reproduce

  1. Create a new sales order, if there are no sales orders already
  2. Go to the orders admin grid
  3. Filter the grid by "Order Date"
  4. After the grid has been filtered by the date range, reload/refresh the page

Expected result

  1. Date range is properly displayed in the "Active filters" area

Actual result

  1. Date range is displayed improperly, including an "Invalid date" message

Admin Grid

Additional note

  1. This happens on any admin grid that uses a date range for filtering, not only the sales order grid
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Jan 30, 2018
@magento-engcom-team
Copy link
Contributor

@dewayneholden, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Jan 31, 2018
@vadimulyanov
Copy link

vadimulyanov commented Apr 25, 2018

Code with wrong date formating is started here:
vendor/magento/module-ui/view/base/web/js/form/element/date.js:120

dateFormat = this.shiftedValue() ? this.outputDateFormat : this.inputDateFormat;

shiftedValue = moment(value, dateFormat);

The code not checks the format of input value.
Date value may be come from js layout with format m/d/y (for example, from filter js layout - 04/10/2018), but in this.inputDateFormat may be set by other checking format, for example YYYY-MM-DD, which breaks the value after moment method.

Code needs have some additional checking of input value format, something like this, for example, my fast fix:

dateFormat = (
    this.shiftedValue()
    || (new RegExp( "(" + this.outputDateFormat.replace(/[dmy]+/gi, '[\\d]+') + ")" ).test(value)) // value may be already in output format
) ? this.outputDateFormat : this.inputDateFormat;

or some simple other

@afavata
Copy link

afavata commented May 4, 2018

any news on this

@vishal-7037
Copy link
Contributor

I am working on this at #dmcdindia

@magento-engcom-team
Copy link
Contributor

@vishal-7037 thank you for joining. Please accept team invitation here and self-assign the issue.

@pareshpansuriya
Copy link
Contributor

#mm19in

@magento-engcom-team
Copy link
Contributor

Hi @pareshpansuriya. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@nntoan
Copy link
Contributor

nntoan commented Mar 4, 2019

Any updates?

@geet07
Copy link

geet07 commented Mar 8, 2019

I am working on this, but how can I self-assign this issue. @magento-engcom-team

@nntoan
Copy link
Contributor

nntoan commented Mar 13, 2019

@geet07 Try to use a hashtag to get the invitation from the GitHub bot. E.g #mm19in then you can self-assign the issue.

@pwaszkis pwaszkis self-assigned this Mar 21, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Mar 21, 2019

Hi @pwaszkis. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@ghost ghost unassigned pwaszkis Sep 27, 2019
@m2-community-project m2-community-project bot removed Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: ready for dev labels Sep 3, 2020
@ghost ghost removed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Oct 20, 2020
@magento-engcom-team magento-engcom-team added Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Nov 30, 2020
@stale
Copy link

stale bot commented Feb 15, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label Feb 15, 2021
@sashas777
Copy link
Contributor

sashas777 commented Feb 15, 2021

@geet07
any luck with the issue?

@stale stale bot removed the stale issue label Feb 15, 2021
@stale
Copy link

stale bot commented May 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: done Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. stale issue
Projects
Development

No branches or pull requests