0
我是新來的燼,開發使用燼js過濾日期功能。當引導日期選擇器日期選擇一些動作調用在燼js控制器
把手:
<div class="input-group date" data-behavior="ActiveRock.filterDatePicker" data-date-before-field="#filter_end_date">
<input type="text" class="form-control" id="filter_start_date" {{action filterPortfolios}}/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
行爲:
$ ->
ActiveRock.datePicker = (el) ->
el.datepicker(
format: 'yyyy/mm/dd'
autoclose: true
).on('show', (e) ->
$('.datepicker').css('z-index', '1151')
true
).on('hide', (e) ->
logic
return false
true
)
控制器動作:filterPortfolios
包括引導日期選擇器
,但它不能正常工作,請提出任何解決方案。
謝謝, Prasad。
看起來像您使用的是jQuery插件的daterangepicker。你能發佈更相關的代碼嗎?意見,控制器等? – Hrishi
添加行爲代碼 –
您最好使用datepicker的組件。 –