Skip to content

Consider switching to flatpickr-ce, a maintained drop-in replacement for flatpickr #948

Open

Description

@colinli007

Hi, thanks for maintaining this project!

This project depends on flatpickr ("flatpickr": "^4.6.3" in src/MatBlazor.Web/package.json). flatpickr hasn't had a release since 4.6.13 in 2022, and many bug reports and pull requests remain unanswered upstream (see flatpickr/flatpickr#1646), so fixes there are unlikely to reach this project.

I maintain flatpickr-ce, a community edition that picks up where upstream left off:

There are two ways to switch:

Option 1: Rename the package

Replace the dependency in src/MatBlazor.Web/package.json:

- "flatpickr": "^4.6.3"
+ "flatpickr-ce": "^4.7.0"

Then update the imports:

- import flatpickr from "flatpickr";
- import "flatpickr/dist/flatpickr.css";
+ import flatpickr from "flatpickr-ce";
+ import "flatpickr-ce/dist/flatpickr.css";

(Locale and plugin imports follow the same pattern, e.g. flatpickr-ce/dist/l10n/de.js.)

Option 2: Keep the flatpickr name with an npm alias (no code changes)

- "flatpickr": "^4.6.3"
+ "flatpickr": "npm:flatpickr-ce@^4.7.0"

All existing imports, CSS paths and locale imports keep working. It works with npm, pnpm and Yarn. This option is also the better fit if the project uses a wrapper such as react-flatpickr or angularx-flatpickr: those wrappers import flatpickr by name, so the alias makes them use flatpickr-ce too.

If you run into any issue with flatpickr-ce, please report it here and I'll take a look. Happy to send a PR for the switch if that helps. Feel free to close this if it doesn't fit the project. Thanks!

Activity

  1. colinli007 commented on Oct 27, 2026

    @colinli007
    Author

    I've opened a PR for this: #949

    It switches flatpickr to flatpickr-ce through an npm alias, so no source changes are needed; it's a one-line change in package.json. Happy to adjust it if you'd prefer a different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions