Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
clientside_validation
Commits
25bc4ea9
Commit
25bc4ea9
authored
Sep 02, 2013
by
webdrips
Committed by
Jelle
Sep 02, 2013
Browse files
Issue #1881684 by webdrips, mpgeek, vbouchet | jfinkel: Fixed v1.37 breaks date_popup() validation.
parent
cd1aba7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside_validation.js
View file @
25bc4ea9
...
...
@@ -1169,15 +1169,25 @@
var
month
=
parseInt
(
parts
[
param
.
monthpos
],
10
);
if
(
isNaN
(
month
))
{
if
(
typeof
Drupal
.
settings
.
clientsideValidation
.
general
.
months
[
parts
[
param
.
monthpos
]]
!==
undefined
)
{
month
=
Drupal
.
settings
.
clientsideValidation
.
general
.
months
[
parts
[
param
.
monthpos
]];
var
date_parts
=
param
.
format
.
split
(
param
.
splitter
);
var
full_idx
=
date_parts
.
indexOf
(
"
F
"
);
var
abbr_idx
=
date_parts
.
indexOf
(
"
M
"
);
var
mopos
=
Math
.
max
(
full_idx
,
abbr_idx
);
if
(
parseInt
(
mopos
)
>
-
1
)
{
param
.
monthpos
=
mopos
;
date
=
new
Date
(
parts
[
param
.
monthpos
]
+
"
1, 2000
"
);
month
=
date
.
getMonth
();
}
else
{
month
=
new
Date
(
parts
[
param
.
monthpos
]
+
"
1, 2000
"
);
month
=
month
.
getMonth
();
if
(
typeof
Drupal
.
settings
.
clientsideValidation
.
general
.
months
[
parts
[
param
.
monthpos
]]
!==
undefined
)
{
month
=
Drupal
.
settings
.
clientsideValidation
.
general
.
months
[
parts
[
param
.
monthpos
]];
}
else
{
month
=
new
Date
(
parts
[
param
.
monthpos
]
+
"
1, 2000
"
);
month
=
month
.
getMonth
();
}
}
}
month
=
month
-
1
;
var
year
=
parseInt
(
parts
[
param
.
yearpos
],
10
);
var
date
=
new
Date
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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