Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
e2295be4
Verified
Commit
e2295be4
authored
Jan 26, 2018
by
Kaspar Vollenweider
👻
Browse files
add new custom input for datepicker
parent
b5195531
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/datetime_picker.es6
View file @
e2295be4
...
...
@@ -6,7 +6,20 @@ function dateTimePicker() {
clearBtn: true,
language: 'de',
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) => {
$(element).bind('click', (event) => {
...
...
app/inputs/date_picker_input.rb
0 → 100644
View file @
e2295be4
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment