Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
facets_range_datepicker_widget
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
facets_range_datepicker_widget
Merge requests
!4
Draft: updates datepicker.js to change autosubmit event to blur instead of change if user is on iOS
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Draft: updates datepicker.js to change autosubmit event to blur instead of change if user is on iOS
issue/facets_range_datepicker_widget-3473998:1.0.x
into
1.0.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Open
Carson Oldson
requested to merge
issue/facets_range_datepicker_widget-3473998:1.0.x
into
1.0.x
8 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
1.0.x
1.0.x (HEAD)
and
latest version
latest version
4ba9933b
1 commit,
8 months ago
1 file
+
6
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
js/datepicker.js
+
6
−
3
Options
@@ -11,9 +11,12 @@
Drupal
.
behaviors
.
facet_datepicker
=
{
attach
:
function
(
context
,
settings
)
{
$
(
'
.facets-widget-datepicker input[data-type=datepicker-min]
'
,
context
).
on
(
'
change
'
,
autoSubmit
);
$
(
'
.facets-widget-range_datepicker input[data-type=datepicker-min]
'
,
context
).
on
(
'
change
'
,
autoRangeSubmit
);
$
(
'
.facets-widget-range_datepicker input[data-type=datepicker-max]
'
,
context
).
on
(
'
change
'
,
autoRangeSubmit
);
// Detect if user is on iOS.
const
iOS
=
/iPad|iPhone|iPod/
.
test
(
navigator
.
userAgent
)
&&
!
window
.
MSStream
;
$
(
'
.facets-widget-datepicker input[data-type=datepicker-min]
'
,
context
).
on
(
iOS
?
'
blur
'
:
'
change
'
,
autoSubmit
);
$
(
'
.facets-widget-range_datepicker input[data-type=datepicker-min]
'
,
context
).
on
(
iOS
?
'
blur
'
:
'
change
'
,
autoRangeSubmit
);
$
(
'
.facets-widget-range_datepicker input[data-type=datepicker-max]
'
,
context
).
on
(
iOS
?
'
blur
'
:
'
change
'
,
autoRangeSubmit
);
function
autoSubmit
()
{
const
$this
=
$
(
this
);
Loading