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 filter is ignoring the format parameter #3102

Closed
2 of 5 tasks
juho-jaakkola opened this issue Jun 25, 2019 · 1 comment
Closed
2 of 5 tasks

Date filter is ignoring the format parameter #3102

juho-jaakkola opened this issue Jun 25, 2019 · 1 comment
Labels
Milestone

Comments

@juho-jaakkola
Copy link

juho-jaakkola commented Jun 25, 2019

Current behavior

I'm trying to change the format of a date within a template using the date filter:

<p>{{ item.created_at | date('format as a parameter here') }}</p>

But the date filter is in fact not using the parameter at all:
https://github.com/DivanteLtd/vue-storefront/blob/d40ba3b958c26d77d2d4c98bdf403af1ffd19275/core/filters/date.js

And therefore the date is always returned in the same format (e.g. 25.6.2019, 11:50:32).

Expected behavior

I should be able to choose the format when using the filter.

Steps to reproduce the issue

Try to pass any argument to the date filter within a template:

<p>{{ item.created_at | date('format as a parameter here') }}</p>

No matter what you pass in, nothing happens.

Repository

The latest commit for the file in the current master branch: https://github.com/DivanteLtd/vue-storefront/blob/d40ba3b958c26d77d2d4c98bdf403af1ffd19275/core/filters/date.js

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser: Any
  • OS: Any
  • Node: Any
  • Code Version: v1.9.1
@juho-jaakkola juho-jaakkola added the bug Bug reports label Jun 25, 2019
@pkarw pkarw modified the milestones: 2.0-rc, 1.10.0 Jun 25, 2019
@grimasod
Copy link
Contributor

grimasod commented Jul 4, 2019

On it

grimasod pushed a commit to grimasod/vue-storefront that referenced this issue Jul 4, 2019
@grimasod grimasod mentioned this issue Jul 4, 2019
8 tasks
grimasod pushed a commit to grimasod/vue-storefront that referenced this issue Jul 4, 2019
grimasod pushed a commit to grimasod/vue-storefront that referenced this issue Jul 4, 2019
@patzick patzick closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants