SaturnTeam / saturn-datepicker

Angular Material Datepicker with range selection
MIT License
276 stars 110 forks source link

Compatibility with Angular 9 #126

Closed cmdaniel closed 4 years ago

cmdaniel commented 4 years ago

Hi, I'm trying to update my apps to Angular 9. When I tried to execute the ng update, these messages appear: Package "saturn-datepicker" has an incompatible peer dependency to "@angular/cdk" (requires "^8.2.0", would install "9.0.0"). Package "saturn-datepicker" has an incompatible peer dependency to "@angular/material" (requires "^8.2.0", would install "9.0.0

SaturnTeam commented 4 years ago

I think my datepicker would work. But not sure. It's time to update, but I quite busy in this week. Please remind me later, if I forget

Carniatto commented 4 years ago

@SaturnTeam remembering you now!

SaturnTeam commented 4 years ago

Sorry, I forgot. I hope during this week I'll update finally. Publishing package is the most hardest thing

cmdaniel commented 4 years ago

That is a great news! Thank you for your attention and glad to test new version when it was available.

Brachacz commented 4 years ago

I'm getting this when installed alongside Angular 9 despite the warnings: image

This disappears once I enable prod but probably shouldn't happen in the first place.

cmdaniel commented 4 years ago

Hi, while the official solution is not available, we did a small change into the js just to be possible to compile, run and debug the whole project.

At node_modules directory, look for: saturn-datepicker > fesm2015 > saturn-datepicker.js

Then, just change the SatCalendar scope, from:

let SatCalendar = class ....

to

var SatCalendar = class ....

sat-calendar-ng9
aliektlee commented 4 years ago

Ride on @cmdaniel solution, it works. However in my case is that since the ng will compile all packages in node_modules folder and it a folder likes this inside the saturn-datepicker folder, image I have to update the file(saturn-datepicker.js) within this folder directly and it works the same. If you haven't that folder that means the ng not yet compile the saturn-datepicker, just follow @cmdaniel solution to update the file. Thanks @cmdaniel a lot. And of course can't wait the official support for angular 9. 😆

NRaf commented 4 years ago

Hey @SaturnTeam, any progress on the upgrade?

SaturnTeam commented 4 years ago

@NRaf 8.0.5

MihailProcudin commented 4 years ago

This likely means that the library which declares SatDatepickerModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also, consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

MihailProcudin commented 4 years ago

Non of the above helped either ... Untitled Untitled1