Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

After updating project to Angular 10.1.0 #157

Open
paco76 opened this issue Sep 8, 2020 · 28 comments
Open

After updating project to Angular 10.1.0 #157

paco76 opened this issue Sep 8, 2020 · 28 comments

Comments

@paco76
Copy link

paco76 commented Sep 8, 2020

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

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

someone else ?

@paco76
Copy link
Author

paco76 commented Sep 8, 2020

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

@paco76 paco76 closed this as completed Sep 8, 2020
@paco76 paco76 reopened this Sep 8, 2020
@Lesterw
Copy link

Lesterw commented Sep 8, 2020

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

@itstueben
Copy link

Had the same issue after updating to angular 10.1.

@joseluiz98
Copy link

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

@itstueben
Copy link

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

@meblum
Copy link

meblum commented Oct 22, 2020

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

@andriipaziuk
Copy link

please publish the update

@ahmedsamir6446
Copy link

Pls mention if this merge is published

@EmanuelChaves
Copy link

Same issue after updating, please merge the update.

@ahmedsamir6446
Copy link

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

@cantelopejoe
Copy link

I assume that this PR has not been merged?

@sabrinaToulouse
Copy link

Hi, any news here?

@AlonsoK28
Copy link

Anybody knows when will be publish the fix update?

@SaturnTeam
Copy link
Owner

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

@sabrinaToulouse
Copy link

Hi @SaturnTeam,

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

Thx

@PhilipSh
Copy link

PhilipSh commented Dec 4, 2020

the same issue after updating to angular 10.2

@SaturnTeam
Copy link
Owner

@sabrinaToulouse It's better to move to Angular Material

@AlonsoK28
Copy link

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?

@paco76
Copy link
Author

paco76 commented Dec 5, 2020

@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!

@JamboBuenna
Copy link

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

@morgangit
Copy link

@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...

@paco76
Copy link
Author

paco76 commented Feb 19, 2021

@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

@morgangit
Copy link

@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
Copy link

@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 !

@davidoween
Copy link

i have the same problem.

@nathan-konv
Copy link

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
Copy link

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
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests