Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to ng13 #564

Closed
vlio20 opened this issue Nov 4, 2021 · 13 comments
Closed

Upgrade to ng13 #564

vlio20 opened this issue Nov 4, 2021 · 13 comments
Assignees

Comments

@vlio20
Copy link
Owner

vlio20 commented Nov 4, 2021

No description provided.

@vlio20 vlio20 self-assigned this Nov 4, 2021
@elcatania
Copy link

Hey, i just stumbled over this library and wanted to ask if there is any timeframe to expect v13 supprt ?

@vlio20
Copy link
Owner Author

vlio20 commented Nov 26, 2021

In the making. For some reason tests are not running.

@vlio20
Copy link
Owner Author

vlio20 commented Nov 30, 2021

@elcatania would you like to be a beta user of the 13 version?

@elcatania
Copy link

@vlio20 Sure, i would love to help

@vlio20
Copy link
Owner Author

vlio20 commented Nov 30, 2021

@elcatania can you try 13.0.0-rc1?

@elcatania
Copy link

@vlio20 Yes i will test it later toady 👍

@vlio20
Copy link
Owner Author

vlio20 commented Nov 30, 2021

@elcatania thanks a lot!!!

@elcatania
Copy link

@vlio20 I tried to implement the basic component in my application but somehow i didnt get it to work.

I imported the module and added the default config from the example

<dp-date-picker [(ngModel)]="newEvent.startDate" [config]="config" mode="day" placeholder="Start">
</dp-date-picker> 
config: IDatePickerConfig = {
        firstDayOfWeek: 'su',
        monthFormat: 'MMM, YYYY',
        disableKeypress: false,
        allowMultiSelect: false,
        closeOnSelect: undefined,
        closeOnSelectDelay: 100,
        openOnFocus: true,
        openOnClick: true,
        onOpenDelay: 0,
        closeOnEnter: true,
        weekDayFormat: 'ddd',
        appendTo: document.body,
        showNearMonthDays: true,
        showWeekNumbers: false,
        enableMonthSelector: true,
        yearFormat: 'YYYY',
        showGoToCurrent: true,
        dayBtnFormat: 'DD',
        monthBtnFormat: 'MMM',
        hours12Format: 'hh',
        hours24Format: 'HH',
        meridiemFormat: 'A',
        minutesFormat: 'mm',
        minutesInterval: 1,
        secondsFormat: 'ss',
        secondsInterval: 1,
        showSeconds: false,
        showTwentyFourHours: false,
        timeSeparator: ':',
        multipleYearsNavigateBy: 10,
        showMultipleYearsNavigation: false,
        locale: moment.locale(),
        hideInputContainer: false,
        returnedValueType: ECalendarValue.String,
        unSelectOnClick: true,
        hideOnOutsideClick: true,
        numOfMonthRows: 3,
        format: 'DD-MM-YYYY'Ï
    };

And i get a lot of errors:

Here a some:

ERROR TypeError: (moment__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (intermediate value)(intermediate value)) is not a function

ERROR TypeError: this.validateFn is not a function

@vlio20
Copy link
Owner Author

vlio20 commented Dec 1, 2021

Thanks for checking this out. The problem is with the way I package the prod build.
I had to remove:

    "umdModuleIds": {
      "moment": "moment"
    }

@elcatania, maybe you know how should we address that change in ng-packagr?

@vlio20
Copy link
Owner Author

vlio20 commented Dec 22, 2021

@elcatania the 13.0.0-rc4 should be working, you can check #565 PR

@vlio20
Copy link
Owner Author

vlio20 commented Dec 22, 2021

Seems to be working on stackblitz and also tested it locally. https://stackblitz.com/edit/angular-srgmj3

@vlio20
Copy link
Owner Author

vlio20 commented Dec 22, 2021

versions 13.0.0 is available

@vlio20 vlio20 closed this as completed Dec 22, 2021
@FrancYescO
Copy link

FrancYescO commented Jan 3, 2023

Hello i'm in the process of upgrading from 12 to 13 and getting
Object literal may only specify known properties, and 'appendTo' does not exist in type 'IDatePickerConfig'
is there any upgrade process to know how i should replace appendTo value of the Config?

maybe is the wrongly mispelled attachTo cited in this breaking changes, but isn't clear how should it be replaced
https://github.com/vlio20/angular-datepicker/blob/master/CHANGELOG.md#breaking-changes

and seems also with ~13.0.0 isn't working, so maybe it's a breaking change not attached to 13.1.0

NVM, the main issue was the missing @import '~@angular/cdk/overlay-prebuilt.css';

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

No branches or pull requests

3 participants