Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
timepicker
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
timepicker
Merge requests
!29
Issue # 3518920 by danrod: Added the new flatpickr.js changes in the 8.x-2.x branch
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue # 3518920 by danrod: Added the new flatpickr.js changes in the 8.x-2.x branch
issue/timepicker-3518920:3518920-support-new-library
into
8.x-2.x
Overview
0
Commits
1
Pipelines
2
Changes
5
Merged
Daniel Rodriguez
requested to merge
issue/timepicker-3518920:3518920-support-new-library
into
8.x-2.x
1 month ago
Overview
0
Commits
1
Pipelines
2
Changes
5
Expand
Closes
#3518920
0
0
Merge request reports
Compare
8.x-2.x
8.x-2.x (base)
and
latest version
latest version
9d7e0eca
1 commit,
1 month ago
5 files
+
116
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
js/flatpickr.js
0 → 100644
+
31
−
0
Options
/**
* @file
*
* Callback for flatpickr.
*/
(
function
(
$
)
{
Drupal
.
behaviors
.
flatpickr
=
{
attach
:(
context
,
settings
)
=>
{
const
fieldName
=
[];
Object
.
keys
(
settings
.
timepicker
.
flatpickr_timepicker
).
forEach
((
key
,
index
)
=>
{
if
(
key
!==
null
)
{
fieldName
[
index
]
=
key
;
}
});
const
requiredOptions
=
{
enableTime
:
true
,
noCalendar
:
true
,
dateFormat
:
"
H:i
"
,
};
for
(
let
i
=
0
;
i
<
fieldName
.
length
;
i
++
)
{
$
(
'
input[name="
'
+
fieldName
[
i
]
+
'
[
'
+
i
+
'
][value][time]"
'
).
flatpickr
(
requiredOptions
);
}
}
};
}(
jQuery
));
Loading