-
Notifications
You must be signed in to change notification settings - Fork 415
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 TypeError: Cannot call method 'getHours' of undefined #1
Comments
So this happens if you dont set an attribute with a value prior to setting the form. I added a default value if empty for date, but the datepicker still does not seem to render. |
Thanks James, will look into this |
No problem. Looks like the datepicker has some issues when being rendered with dom elements. Appending the html of the widget to exports.Date seemed to do the trick. https://github.com/jamescharlesworth/backbone-forms/commit/ad74e7d7217283ac3949130de87c841014d499f1 Let me know if you think there is a better way to accomplish this. Thanks! |
I've pushed an update that includes setting the default Date, as well as a UI test for dates and datepickers - see if the date editors work for you now. If you open test/index.html and go to the bottom of the page you should see the Date, DatePicker and List editors on the page. |
Thanks. The date issue seems to be fixed, but the calendar still does not load for me when called after the dom has already loaded. Most likely a mistake on my implementation, but will let you know it it turns out to be your code. |
Hello,
First off, thank you for creating backbone-forms. I've forked it and have run into a problem with DateTime. Not sure if I'm just not getting it or its a bug. The exact error i'm getting is with DateTime in the schema.
"Uncaught TypeError: Cannot call method 'getHours' of undefined"
You can clone my fork here to reproduce. https://github.com/jamescharlesworth/backbone-forms. Just load the index.html page and you should see the error.
Thank you,
James
The text was updated successfully, but these errors were encountered: