Datepicker errors

2 Answers 140 Views
DatePicker
Jimmy
Top achievements
Rank 1
Iron
Jimmy asked on 10 Nov 2021, 07:29 AM

I tried to use the datepicker component and are having issues/errors

at first it asked me to add the angular localize package, which I did and solved the first issue.

But the it started throwing another error being'

core.js:6486 ERROR NullInjectorError: R3InjectorError(AppModule)[PopupService -> PopupService -> PopupService]: 
  NullInjectorError: No provider for PopupService!
    at NullInjector.get (core.js:11108)
    at R3Injector.get (core.js:11275)
    at R3Injector.get (core.js:11275)
    at R3Injector.get (core.js:11275)
    at NgModuleRef$1.get (core.js:25340)
    at Object.get (core.js:25054)
    at lookupTokenUsingModuleInjector (core.js:3342)
    at getOrCreateInjectable (core.js:3454)
    at Module.ɵɵdirectiveInject (core.js:14744)
    at NodeInjectorFactory.DatePickerComponent_Factory [as factory] (index.js:6790)

Do I need to make my own popupservice ? I was under the assumption that the kendo installs added all dependencies.

Jimmy
Top achievements
Rank 1
Iron
commented on 10 Nov 2021, 09:28 AM | edited

It has something to do with modules missing

2 Answers, 1 is accepted

Sort by
0
Jimmy
Top achievements
Rank 1
Iron
answered on 10 Nov 2021, 09:28 AM

To answer my own Question after a long long search :

I had to import the popup module and the calendar module as well , because I was using the datepicker module only/

 

If I import the general DateInputs Module, these extra steps are not necessary.

0
Martin Bechev
Telerik team
answered on 12 Nov 2021, 09:44 AM

Hi Jimmy,

Thank you for the provided error log.

The Kendo UI for Angular Popup is a dependency of the date-inputs package. All dependencies of the package can be found here:

https://www.telerik.com/kendo-angular-ui/components/dateinputs/get-started/#toc-dependencies

When installing the DateInputs, following the Quick Setup or Manual Setup approach, all dependencies of the package are installed automatically.

Having a basic DatePicker configuration:

<kendo-datepicker
       [(value)]="value"
></kendo-datepicker>

importing the DatePickerModule should be enough for the widget to work properly. Please check the following StackBlitz demo:

https://stackblitz.com/edit/angular-lbryq3

Based on the provided information I am unable to provide further details why the PopupModule and CalendarModule are required to be imported explicitly in this case. 

In order to assist further on this case, I will need a runnable demo that reproduces the reported issue so that I can have a look at the configuration and be able to provide answers to this question. Thank you in advance.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DatePicker
Asked by
Jimmy
Top achievements
Rank 1
Iron
Answers by
Jimmy
Top achievements
Rank 1
Iron
Martin Bechev
Telerik team
Share this question
or