Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
d4f7f70f
Commit
d4f7f70f
authored
Feb 14, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop Pikaday using moment
parent
b4c00ae4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
5 deletions
+10
-5
app/assets/javascripts/due_date_select.js.es6
app/assets/javascripts/due_date_select.js.es6
+4
-2
app/assets/javascripts/issuable_form.js
app/assets/javascripts/issuable_form.js
+2
-1
app/assets/javascripts/member_expiration_date.js.es6
app/assets/javascripts/member_expiration_date.js.es6
+2
-1
app/views/profiles/personal_access_tokens/index.html.haml
app/views/profiles/personal_access_tokens/index.html.haml
+1
-1
config/webpack.config.js
config/webpack.config.js
+1
-0
No files found.
app/assets/javascripts/due_date_select.js.es6
View file @
d4f7f70f
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
const calendar = new Pikaday({
const calendar = new Pikaday({
field: $dueDateInput.get(0),
field: $dueDateInput.get(0),
theme: 'gitlab-theme',
theme: 'gitlab-theme',
format: '
YYYY-MM-DD
',
format: '
yyyy-mm-dd
',
onSelect: (dateText) => {
onSelect: (dateText) => {
const formattedDate = dateFormat(new Date(dateText), 'yyyy-mm-dd');
const formattedDate = dateFormat(new Date(dateText), 'yyyy-mm-dd');
...
@@ -63,6 +63,7 @@
...
@@ -63,6 +63,7 @@
}
}
});
});
calendar.setDate(new Date($dueDateInput.val()));
this.$datePicker.append(calendar.el);
this.$datePicker.append(calendar.el);
this.$datePicker.data('pikaday', calendar);
this.$datePicker.data('pikaday', calendar);
}
}
...
@@ -169,11 +170,12 @@
...
@@ -169,11 +170,12 @@
const calendar = new Pikaday({
const calendar = new Pikaday({
field: $datePicker.get(0),
field: $datePicker.get(0),
theme: 'gitlab-theme',
theme: 'gitlab-theme',
format: '
YYYY-MM-DD
',
format: '
yyyy-mm-dd
',
onSelect(dateText) {
onSelect(dateText) {
$datePicker.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
$datePicker.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
}
}
});
});
calendar.setDate(new Date($datePicker.val()));
$datePicker.data('pikaday', calendar);
$datePicker.data('pikaday', calendar);
});
});
...
...
app/assets/javascripts/issuable_form.js
View file @
d4f7f70f
...
@@ -40,11 +40,12 @@
...
@@ -40,11 +40,12 @@
calendar
=
new
Pikaday
({
calendar
=
new
Pikaday
({
field
:
$issuableDueDate
.
get
(
0
),
field
:
$issuableDueDate
.
get
(
0
),
theme
:
'
gitlab-theme
'
,
theme
:
'
gitlab-theme
'
,
format
:
'
YYYY-MM-DD
'
,
format
:
'
yyyy-mm-dd
'
,
onSelect
:
function
(
dateText
)
{
onSelect
:
function
(
dateText
)
{
$issuableDueDate
.
val
(
dateFormat
(
new
Date
(
dateText
),
'
yyyy-mm-dd
'
));
$issuableDueDate
.
val
(
dateFormat
(
new
Date
(
dateText
),
'
yyyy-mm-dd
'
));
}
}
});
});
calendar
.
setDate
(
new
Date
(
$issuableDueDate
.
val
()));
}
}
}
}
...
...
app/assets/javascripts/member_expiration_date.js.es6
View file @
d4f7f70f
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
const calendar = new Pikaday({
const calendar = new Pikaday({
field: $input.get(0),
field: $input.get(0),
theme: 'gitlab-theme',
theme: 'gitlab-theme',
format: '
YYYY-MM-DD
',
format: '
yyyy-mm-dd
',
minDate: new Date(),
minDate: new Date(),
onSelect(dateText) {
onSelect(dateText) {
$input.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
$input.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
},
},
});
});
calendar.setDate(new Date($input.val()));
$input.data('pikaday', calendar);
$input.data('pikaday', calendar);
});
});
...
...
app/views/profiles/personal_access_tokens/index.html.haml
View file @
d4f7f70f
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
new
Pikaday
({
new
Pikaday
({
field
:
$dateField
.
get
(
0
),
field
:
$dateField
.
get
(
0
),
theme
:
'
gitlab-theme
'
,
theme
:
'
gitlab-theme
'
,
format
:
'
YYYY-MM-DD
'
,
format
:
'
yyyy-mm-dd
'
,
minDate
:
new
Date
(),
minDate
:
new
Date
(),
onSelect
:
function
(
dateText
)
{
onSelect
:
function
(
dateText
)
{
$dateField
.
val
(
dateFormat
(
new
Date
(
dateText
),
'
yyyy-mm-dd
'
));
$dateField
.
val
(
dateFormat
(
new
Date
(
dateText
),
'
yyyy-mm-dd
'
));
...
...
config/webpack.config.js
View file @
d4f7f70f
...
@@ -83,6 +83,7 @@ var config = {
...
@@ -83,6 +83,7 @@ var config = {
new
CompressionPlugin
({
new
CompressionPlugin
({
asset
:
'
[path].gz[query]
'
,
asset
:
'
[path].gz[query]
'
,
}),
}),
new
webpack
.
IgnorePlugin
(
/moment/
,
/pikaday/
),
],
],
resolve
:
{
resolve
:
{
...
...
Write
Preview
Markdown
is supported
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