Add id to input fields and use that for jQuery
This commit is contained in:
parent
ae56bc2abf
commit
3ded089b8e
|
@ -14,11 +14,11 @@ this.ckan.module('daterangepicker-module', function ($, _) {
|
|||
|
||||
// Populate the datepicker and hidden fields
|
||||
if (param_start) {
|
||||
$('input[name="start"]').val(moment.utc(param_start).years());
|
||||
$('#datepicker #start').val(moment.utc(param_start).years());
|
||||
$('#ext_startdate').val(param_start);
|
||||
}
|
||||
if (param_end) {
|
||||
$('input[name="end"]').val(moment.utc(param_end).years());
|
||||
$('#datepicker #end').val(moment.utc(param_end).years());
|
||||
$('#ext_enddate').val(param_end);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
<a href="{{ h.remove_url_param(['ext_startdate', 'ext_enddate']) }}" class="action">{{ _('Clear') }}</a>
|
||||
</h2>
|
||||
<div class="module-content input-prepend input-daterange" data-module="daterange-query" id="datepicker">
|
||||
<input type="text" class="input-mini" style="cursor:pointer;" readonly="" name="start" data-module="daterangepicker-module" />
|
||||
<input type="text" class="input-mini" style="cursor:pointer;" readonly="" name="start" id="start" data-module="daterangepicker-module" />
|
||||
<span class="add-on" style="border:none;background-color:#ffffff;"> to </span>
|
||||
<input type="text" class="input-mini" style="cursor:pointer;" readonly="" name="end" data-module="daterangepicker-module" />
|
||||
<input type="text" class="input-mini" style="cursor:pointer;" readonly="" name="end" id="end" data-module="daterangepicker-module" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in New Issue