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

Ionic 5 Update Request #297

Open
TingaZack opened this issue May 1, 2020 · 2 comments
Open

Ionic 5 Update Request #297

TingaZack opened this issue May 1, 2020 · 2 comments

Comments

@TingaZack
Copy link

Ionic version: (check one with "x")
[ ] 2.x
[ ] 3.x
[ ] 4.x
[ - ] 5.x

Ion2-calendar mode: (check one with "x")
[ ] components mode
[ ] modal mode

I'm submitting a ... (check one with "x")
[ - ] bug report
[ ] feature request
[ ] help me

Current behavior:

The error comes from momentjs package which I believe must be updated and optimised for Ionic 5.

Expected behavior:

Steps to reproduce:

Related code:
insert short code snippets here

I ran the following code in Ionic 5 as you'd expect from your documentation: 
`  async openCalendar() {
    const options: CalendarModalOptions = {
      pickMode: 'range',
      title: 'Range',
      color: 'danger'
    };

    let myCalendar = await this.modalCtrl.create({
      component: CalendarModal,
      componentProps: { options }
    });

    myCalendar.present();
  }`

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Screenshot 2020-05-01 at 23 23 17

After running the above code snippet from the documentation, this is an error I got below:
ERROR TypeError: moment is not a function at CalendarModal.push../node_modules/ion2-calendar/dist/components/calendar.modal.js.CalendarModal.init (calendar.modal.js:47) at CalendarModal.push../node_modules/ion2-calendar/dist/components/calendar.modal.js.CalendarModal.ngOnInit (calendar.modal.js:31) at checkAndUpdateDirectiveInline (core.js:31910) at checkAndUpdateNodeInline (core.js:44367) at checkAndUpdateNode (core.js:44306) at debugCheckAndUpdateNode (core.js:45328) at debugCheckDirectivesFn (core.js:45271) at Object.eval [as updateDirectives] (CalendarModal_Host.ngfactory.js? [sm]:1) at Object.debugUpdateDirectives [as updateDirectives] (core.js:45259) at checkAndUpdateView (core.js:44271)

I then figured that the dependencies haven't been updated in a while, especially with some changes in Ionic 5. I would like to request that you update this very important calendar in Ionic to be also used in Ionic 5.

@TingaZack TingaZack changed the title Ionic 5 update Ionic 5 Update Request May 1, 2020
@ulver2812
Copy link

There's a PR that fix this, in the meanwhile use this repo: https://github.com/shaneparsons/ion2-calendar

Run these commmands:

npm uninstall ion2-calendar
npm i git+https://github.com/shaneparsons/ion2-calendar.git

@zolakt
Copy link

zolakt commented Jun 21, 2022

Did the PR ever get merged, or we still need to use Shanes repo for Ionic 5/6?

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

No branches or pull requests

3 participants