I cannot seem to be able to pass a string from html
<div class="download-by-date" data-hello="dd/mm/yy">
to coffeescript:
$('.datepicker').datepicker({ dateFormat: $(this).data('hello') })
Here is the code from the slim file
= render layout: 'shared/section', locals: { title: 'Export on Demand', description: "Use this section to export all orders within a particular date period or starting from a reference" } do
.download-by-date data-hello='dd/mm/yy'
.row
.column.medium-6
label
How can I read the data-hello attribute correctly in my coffeescript file? I'm trying to get this in coffeescript:
$('.datepicker').datepicker({ dateFormat: "dd/mm/yy" })