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

dateAdapter not have effect #463

Closed
KVAnton-WEB opened this issue Aug 25, 2022 · 1 comment
Closed

dateAdapter not have effect #463

KVAnton-WEB opened this issue Aug 25, 2022 · 1 comment

Comments

@KVAnton-WEB
Copy link

KVAnton-WEB commented Aug 25, 2022

image

parsing does not work and formatting result is not displayed

Input Data: "15.11.2008"
After editing - a different format is obtained (2022-11-15)

        {
          prop: "sale_from",
          name: "Sales From",
          columnType: "date",
          dateAdapter: {
            parse(value = "", createDate) {
              const matches = value.match(/^(\d{1,2})\.(\d{1,2})\.(\d{4})$/);
              if (matches) {
                return createDate(matches[3], matches[2], matches[1]);
              }
            },
            format(date) {
              return `${date.getDate()}.${date.getMonth() + 1}.${date.getFullYear()}`;
            },
          },
        },
@KVAnton-WEB KVAnton-WEB changed the title formatting not working after editing dateAdapter not have effect Aug 25, 2022
@revolist
Copy link
Owner

Try v2.0.20+ and v4 of the grid. Show work now.

@revolist revolist transferred this issue from revolist/revogrid-column-date Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants