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

Uncaught Error: infinite rendering invalidation detected, with ember-pikaday 2.2.2 #141

Open
mariowilde opened this issue Mar 29, 2017 · 4 comments

Comments

@mariowilde
Copy link

On ember 2.12 ember-pikaday 2.2.2 still causes the infinite rendering invalidation that first appeared in version 2.2.1. Downgrading to 2.2.0 resolves the issue.
Seems like #140 did not fix the error.

@duizendnegen
Copy link
Contributor

Welcoming another PR

@corrspt
Copy link

corrspt commented May 26, 2017

In case anyone get's here, I had a situation where I was using a "maxDate" to be equal to "today" in ember-pikaday and when the user selected that day it would blow up with this error. To work-around it I did the following:

template.hbs

{{pikaday-input value=value maxDate=currentDate}}

components.js

currentDate: computed(function() {
    let today = moment(new Date()).endOf('day');
    return today.toDate();
  }),

By setting the currentDate to the end of the day (23:59:59) it seems that whatever is triggering the error does not happen.

@gabrielle-ong
Copy link

+1 for this, downgrading to 2.2.0 resolves this error for me. This only occured for users whose timezone is behind UTC time, regardless if I set useUTC=true. Details:

{{pikaday-input onSelection=(action 'changedDateValue')
                           value=order.shipAt
                           minDate=minDate
                           useUTC=true}}
//component.js
minDate: new Date(),
actions:
  changedDateValue(date) {
      // debugging log:
      // new Date() => Sun Sep 17 2017 22:34:56 GMT-0700 (PDT)
      // date => Sat Sep 16 2017 17:00:00 GMT-0700 (PDT)
      // this.get('minDate') => Sun Sep 17 2017 00:00:00 GMT-0700 (PDT)
      this.set('order.shipAt', date); //infinite loop occurs
   },

@duizendnegen
Copy link
Contributor

Welcoming a PR :)

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

4 participants