I keep getting an error while using DateTimepicker gem 'foundation-datetimepicker-rails'
The error I keep getting is:
Uncaught TypeError: Object [object Object] has no method 'fdatepicker'
The html looks like this:
<%= f.text_field :due_date_proposed, id: "dp1", value: "31.01.2014" %>
Before the </body>
tag, I have:
<script type="text/javascript">
$('#dp1').fdatepicker();
</script>
Can anyone help, please? Thanks!
I followed with original documentation https://github.com/najlepsiwebdesigner/foundation-datepicker
and copied js and css files in vendor
Everything works:
Librariries in gem are broken. (same error)
My diff with fdatepicker initialization:
https://github.com/itsNikolay/fdatepicker/commit/286b9a38dba9fdedda9751d838bb9d6d4c5336c7
Got http://screencloud.net/v/cOyh
Do you want to show a DatePicker or a DateTimePicker? Try to initialize it like this:
$('#dp1').fdatetimepicker();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.