Verified Commit e2295be4 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

add new custom input for datepicker

parent b5195531
...@@ -6,7 +6,20 @@ function dateTimePicker() { ...@@ -6,7 +6,20 @@ function dateTimePicker() {
clearBtn: true, clearBtn: true,
language: 'de', language: 'de',
autoclose: true, autoclose: true,
todayHighlight: true todayHighlight: true,
daysOfWeekHighlighted: [0,6],
immediateUpdates: true
});
const datepickersSingle = $('.input-date-picker input').datepicker({
format: 'yyyy-mm-dd',
todayBtn: true,
clearBtn: true,
language: 'de',
autoclose: true,
todayHighlight: true,
daysOfWeekHighlighted: [0,6],
immediateUpdates: true
}); });
$('#performance_report_period_years li a').each((index, element) => { $('#performance_report_period_years li a').each((index, element) => {
$(element).bind('click', (event) => { $(element).bind('click', (event) => {
......
class DatePickerInput < SimpleForm::Inputs::Base
def input
template.content_tag(:div, class: 'input-group date form_datetime input-date-picker') do
template.concat @builder.text_field(attribute_name, input_html_options)
end
end
def input_html_options
super.merge(class: 'input-sm form-control', data: { provide: 'datepicker' })
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment