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

fix(filter): Date Filters using Flatpickr throw error w/invalid locale #267

Merged
merged 1 commit into from
Nov 30, 2019

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Nov 30, 2019

  • ref Angular-Slickgrid issue #346
  • when using a locale that Flatpickr doesn't support, like "ua", it should use "en" (English) as default locale.
    • it will display a console warning that this locale is not supported but not throw an error (unless user set a different locale, see next)
    • user can choose to override the locale by setting locale to use via
      • filter: { filterOptions: { locale: 'en' } }

New behavior with this PR, it will now show a console warning to advise user that the locale is not supported, it will use English locale instead of throwing an error

image

@codecov
Copy link

codecov bot commented Nov 30, 2019

Codecov Report

Merging #267 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
+ Coverage   99.83%   99.83%   +0.01%     
==========================================
  Files         150      150              
  Lines        8448     8456       +8     
  Branches     2784     2786       +2     
==========================================
+ Hits         8433     8441       +8     
  Misses         15       15
Impacted Files Coverage Δ
src/aurelia-slickgrid/services/grid.service.ts 100% <100%> (ø) ⬆️
...rc/aurelia-slickgrid/filters/compoundDateFilter.ts 100% <100%> (ø) ⬆️
src/aurelia-slickgrid/filters/dateRangeFilter.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f331da4...2e6a7cc. Read the comment docs.

@ghiscoding ghiscoding merged commit 376d852 into master Nov 30, 2019
@ghiscoding ghiscoding deleted the fix/date-filter-unsupported-locales branch November 30, 2019 19:13
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

Successfully merging this pull request may close these issues.

1 participant