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
confirmDatePlugins using with angular5 #1272
Comments
@Picktarget just omit the "new" keyword. The plugin will work regardless |
yeah I just use plugins: [confirmDatePlugin(this.opt)],then the browser told me |
@Picktarget try import * as confirmDatePlugin from 'flatpickr/dist/plugins/confirmDate/confirmDate'; |
but how I use [confirmDatePlugin({ confirmText: 'OK' })]? |
@Picktarget the same way |
error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof' flatpickr/dist/plugins/confirmDate/confir...' has no compatible call signatures. |
@Picktarget okay, try this: import confirmDatePlugin from 'flatpickr/src/plugins/confirmDate/confirmDate'; |
should I download the source_code.zip for using? |
@Picktarget No. I will investigate this myself and update the issue when I find a solution :) For now, try using |
ok thanks for ur help,best wishes to u! |
hey man!what's going on,please? |
@Picktarget this is now fixed in v4.4 |
Thanks a lot.How should I use it?Just following the development documentation? |
@Picktarget yes. just import it like normal ( Let me know if you can't figure this out. |
ok,thanks for ur generosity. |
when I follow the example in plugins page of documentation,tslint told me error TS2350: Only a void function can be called with the 'new' keyword. how can i resolve it.
private opt = {
confirmIcon: '',
confirmText: 'OK ',
showAlways: true,
theme: 'light'
}
public config = {
wrap: true, enableTime: true,
locale: Mandarin,
dateFormat: 'Y-m-d H:i',
altInput: false,
time_24hr: true,
minDate: new Date(),
plugins: [new confirmDatePlugin(this.opt)]
Your Environment
The text was updated successfully, but these errors were encountered: