You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(filter): Date Filters using Flatpickr throw error w/invalid locale
- fixes#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 `filterOptions: { locale: 'en' }`
expect(consoleSpy).toHaveBeenCalledWith(expect.toInclude('[Angular-Slickgrid - CompoundDate Filter] It seems that "zx" is not a locale supported by Flatpickr'));
expect(consoleSpy).toHaveBeenCalledWith(expect.toInclude('[Angular-Slickgrid - DateRange Filter] It seems that "zx" is not a locale supported by Flatpickr'));
console.warn(`[Angular-Slickgrid - CompoundDate Filter] It seems that "${language}" is not a locale supported by Flatpickr, we will use "en" instead. `
309
+
+`To avoid seeing this message, you can specifically set "filter: { filterOptions: { locale: 'en' } }" in your column definition.`);
0 commit comments