saturn-datepicker icon indicating copy to clipboard operation
saturn-datepicker copied to clipboard

After updating project to Angular 10.1.0

Open paco76 opened this issue 3 years ago • 28 comments

After updating my Angular project to the latest version 10.1.0 I get the following error..

Class 'SatDatepicker<D>' incorrectly implements interface 'CanColor'. Property 'defaultColor' is missing in type 'SatDatepicker<D>' but required in type 'CanColor'.

someone else ?

paco76 avatar Sep 08 '20 12:09 paco76

Okay, as a temporary fix I added defaultColor: ThemePalette key value pair to the SatDatepicker class inside the app node_modules folder

paco76 avatar Sep 08 '20 12:09 paco76

Updated angular material from version 9 to version 10.2.0 and got the exact same error as mentioned by @paco76.

Lesterw avatar Sep 08 '20 14:09 Lesterw

Had the same issue after updating to angular 10.1.

itstueben avatar Sep 09 '20 09:09 itstueben

Had the same bug, just added the missing property inside 'datepicker.d.ts'.

joseluiz98 avatar Sep 11 '20 15:09 joseluiz98

I switched to default mat-datepicker. https://material.angular.io/components/datepicker/overview#date-range-input-forms-integration

itstueben avatar Sep 16 '20 07:09 itstueben

I see the fix has been merged. Any would you please publish the update?

meblum avatar Oct 22 '20 14:10 meblum

please publish the update

andriipaziuk avatar Oct 23 '20 07:10 andriipaziuk

Pls mention if this merge is published

ahmedsamir6446 avatar Oct 28 '20 15:10 ahmedsamir6446

Same issue after updating, please merge the update.

EmanuelChaves avatar Nov 04 '20 20:11 EmanuelChaves

I would prefer using the angular material date range picker as @itstueben

ahmedsamir6446 avatar Nov 05 '20 08:11 ahmedsamir6446

I assume that this PR has not been merged?

cantelopejoe avatar Nov 16 '20 15:11 cantelopejoe

Hi, any news here?

sabrinaToulouse avatar Dec 03 '20 09:12 sabrinaToulouse

Anybody knows when will be publish the fix update?

AlonsoK28 avatar Dec 03 '20 23:12 AlonsoK28

Anybody knows when will be publish the fix update?

When someone makes a pr with working building process. I can't find a time to compile an ng library for new angular verison

SaturnTeam avatar Dec 04 '20 08:12 SaturnTeam

Hi @SaturnTeam,

Is this lib still maintained or should we move on the new material date range picker?

Thx

sabrinaToulouse avatar Dec 04 '20 10:12 sabrinaToulouse

the same issue after updating to angular 10.2

PhilipSh avatar Dec 04 '20 11:12 PhilipSh

@sabrinaToulouse It's better to move to Angular Material

SaturnTeam avatar Dec 04 '20 19:12 SaturnTeam

Okay, as a temporary fix I added defaultColor: ThemePalette key value pair to the SatDatepicker class inside the app node_modules folder

Can you explain how to do this?

AlonsoK28 avatar Dec 04 '20 23:12 AlonsoK28

@AlonsoK28 go here /node_modules/saturn-datepicker/datepicker.d.ts and find the following line of code and add the line defaultColor: ThemePalette

export declare class SatDatepicker<D> implements OnDestroy, CanColor {

...

 private _document;
/** Whenever datepicker is for selecting range of dates. */
defaultColor: ThemePalette // this line is added here to fix an issue after upgrading to angular 10 !!!

...

}`

save and ng serve your app good luck!

paco76 avatar Dec 05 '20 08:12 paco76

Bump on the when can this be merged in. This is a simple fix & the temporary fix is only going to resolve the issue for those who are checking in contents of node modules

JamboBuenna avatar Jan 12 '21 11:01 JamboBuenna

@AlonsoK28 go here /node_modules/saturn-datepicker/datepicker.d.ts and find the following line of code and add the line defaultColor: ThemePalette

export declare class SatDatepicker<D> implements OnDestroy, CanColor {

...

 private _document;
/** Whenever datepicker is for selecting range of dates. */
defaultColor: ThemePalette // this line is added here to fix an issue after upgrading to angular 10 !!!

...

}`

save and ng serve your app good luck!

@paco76 when I go to this file all I see is:

`/**

  • Generated bundle index. Do not edit. */ export * from './public-api';

//# sourceMappingURL=saturn-datepicker.d.ts.map`

Any ideas? Can't get rid of this 'defaultColor' error...

morgangit avatar Feb 19 '21 01:02 morgangit

@AlonsoK28 it looks like you are on the wrong file. saturn-datepicker.d.ts.map make sure it does not end with .map the file name should be saturn-datepicker.d.ts

paco76 avatar Feb 19 '21 02:02 paco76

@paco76 no I really am in saturn-datepicker.d.ts image

The contents of the .map file is:

{"version":3,"file":"saturn-datepicker.d.ts","sources":["saturn-datepicker.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\nexport * from './public-api';\n"]}

morgangit avatar Feb 19 '21 02:02 morgangit

@AlonsoK28 go here /node_modules/saturn-datepicker/datepicker.d.ts and find the following line of code and add the line defaultColor: ThemePalette

export declare class SatDatepicker<D> implements OnDestroy, CanColor {

...

 private _document;
/** Whenever datepicker is for selecting range of dates. */
defaultColor: ThemePalette // this line is added here to fix an issue after upgrading to angular 10 !!!

...

}`

save and ng serve your app good luck!

@paco76 when I go to this file all I see is:

`/**

  • Generated bundle index. Do not edit. */ export * from './public-api';

//# sourceMappingURL=saturn-datepicker.d.ts.map`

Any ideas? Can't get rid of this 'defaultColor' error...

In case anyone else is trying this, the small thing that threw me in @paco76 's suggested fix was the file path quoted:

/node_modules/saturn-datepicker/datepicker.d.ts

Actually it was:

/node_modules/saturn-datepicker/datepicker/datepicker.d.ts

Small thing but it threw me because there is a saturn-datepicker.ts file at the stated file-path. Anyway once I added the suggested line to the correct file this fix worked for me so thanks @paco76 !

morgangit avatar Feb 24 '21 05:02 morgangit

i have the same problem.

davidoween avatar Feb 26 '21 11:02 davidoween

Not sure and will verify tomorrow. But I got the feeling there are 2 published packages: saturn-datepicker and saturn-datepicker-ext. The latter one seems to have the fix but not the former one which I actually use. If anybody has a chance to try before I do. I am off for today :)

nathan-konv avatar Mar 02 '21 22:03 nathan-konv

And it seems that @angular/material v11.2.2 now offers to pick a range: https://material.angular.io/components/datepicker/overview#date-range-selection

nathan-konv avatar Mar 02 '21 22:03 nathan-konv

I confirm. I used the npm package saturn-datepicker-ext instead of saturn-datepicker and everything is working fine on my end. Will replace that by the newly supported range picker from angular material v11.2.2 soon.

nathan-konv avatar Mar 03 '21 20:03 nathan-konv