p-calendar and jquery, jquery-ui dependencies

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
st-clair-clarke
Posts: 28
Joined: 18 Sep 2016, 10:35

06 Oct 2016, 21:29

Hi,

I am attempting to use the p-calendar widget as shown below:

Code: Select all

<p-calendar
            [(ngModel)] = 'age.dob'
            [monthNavigator] = 'true'
            [yearNavigator] = 'true'
            formControlName = 'calendar'></p-calendar>
Webstorm throws an error that it cannot find jquery, jquery-ui.

I installed the following via npm

Code: Select all

"@types/jquery": "^2.0.33",
"jquery": "^3.1.1",
"jquery-ui": "^1.12.1",
In my age.component.ts I have:

Code: Select all

import * as jQuery from  'jquery'
I then do an npm cache clean following by ng serve (angular-cli command)

However, I still get the following error

Code: Select all

error_handler.js:45 EXCEPTION: Uncaught (in promise): Error: Error in ./AgeComponent class AgeComponent - inline template:31:8 caused by: jQuery is not defined
I cannot seem to find typescript definition file for jquery-ui.

What else do I have to do to display the p-calender widget.

Thanks

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Oct 2016, 09:53

Calendar in beta20, does not use jquery anymore.

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests