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

How to use in react #6

Closed
kenzouno1 opened this issue Oct 9, 2018 · 1 comment
Closed

How to use in react #6

kenzouno1 opened this issue Oct 9, 2018 · 1 comment

Comments

@kenzouno1
Copy link

I like this plugin but i can't import to my react project. i try import but always error shortcutButtonsPlugin is not defined

import 'shortcut-buttons-flatpickr';
import { ShortcutButtonsPlugin } from 'shortcut-buttons-flatpickr';
import ShortcutButtonsPlugin from 'shortcut-buttons-flatpickr';

@jcsmorais
Copy link
Owner

@kenzouno1 can you try the following?

import { ShortcutButtonsPlugin } from 'shortcut-buttons-flatpickr/dist/types/index.d';

// ...

flatpickr('#calendar', {
    // flatpickr options
    plugins: [
        ShortcutButtonsPlugin({
            // shortcut buttons plugin options
        }),
    ],
});

Let me know if it works, or in case it doesn't, which error messages you're getting.

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