Comments (6)
Could you please provide a bare demo of some sort so I can see what's going on there?
from pickadate.js.
The error states that it isn't finding the DOM node. Possibilities:
a- The JS is loading before the DOM is being filled by the AJAX call
b- Your selector is wrong.
How are you triggering the JS? Some could goes a long way...
from pickadate.js.
So, I have a container which functions as a container to display content in an overlay:
<div id="overlay_content" style="display:none;">
<%= yield :overlay %>
</div>
When I call new_object_path via link_to remote: true, I render content into this overlay.
new.js.erb
$('#overlay_content').html('<%=j render(partial: "ideas/new", locals: {plan: @plan, idea: @idea}) %>');
overlay_open();
I have remote forms and remote links in this rendered partial, and everything is working fine.
However when I attach pickadate I get the error I posted before:
$('input.datepicker').pickadate();
I use:
jQuery v1.7.2
jquery_ujs for rails
modernizr 2.6.1
TinySort 1.4.29
moment.js version : 1.7.2
Livestamp.js v1.1.2
Pickadate 1.4.0
I did some trial & error and I get the same exception every time I call $('input.datepicker').pickadate(); on non-ajax rendered input elements too.
Maybe everything is fine with pickadate and there are some problem in my environment.
from pickadate.js.
I cleaned completely the whole layout, the problem is the same. My empty html looks like this :)
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<input type="date" class="datepicker"/>
</body>
</html>
from pickadate.js.
Ok, guys, I finally figured out: the problem was jquery 1.7.2. After updating to jquery 1.8.3 everything is working fine:)
Thank you!
from pickadate.js.
Great!
from pickadate.js.
Related Issues (20)
- Rendering on input element v5
- Error when added two calendars on a single page
- BUG formatSubmit generates the invalid name, when used the HTML input's name as array
- Maintainer wanted HOT 4
- Translation
- Infinite loop occurs with `.set('max', -Infinity)`
- Event click error in indexOf property in picker.js file
- Date picker defaults to 2099 since Jan 1, 2022. HOT 1
- `getRealEventTarget` should use `Event.composedPath()` instead of `Event.path`
- iphone don't work
- Date picker can't display well when on click HOT 1
- time piker select 24:00 hour instead of am / pm
- pickatime with classic theme is broken on Chrome 107 HOT 10
- Legacy.js error with Microsoft Edge
- Pickatime does not always handle decimal minimum time
- Hi, I cant seem to make it work on React?
- Time picker activates on repeated onRender HOT 1
- Dynamically disabling dates with data from server as user interacts with calendar: Allow disable {from: -Infinity, to: Infinity} or Prevent cascading changes when set disable when the currently selected item object becomes disabled (for DATES)
- Change language dynamically
- pickadate is using deprecated Jquery functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pickadate.js.