Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
黃宣傑
Autolab
Commits
30424284
Commit
30424284
authored
7 years ago
by
Aatish Nayak
Committed by
GitHub
7 years ago
Browse files
Options
Download
Patches
Plain Diff
change how datepickers get default date (#846)
parent
a0de42f5
master
account_for_DST_in_late_by_calculation
api_scopes_quickfix
api_show_submissions_from_all_clients
api_v1
api_v1_hotfix
assessment_form
cg2v-regrade_errors_fail
create_announcement_bug
create_assessment_configs_during_autopopulate
devansh_v2.1.0_patches
develop
development
docker
drag_drop
due_date_fix
error_audit_2018
feature_speedgrader
feature_speedgrader_GDUCache_fix
feature_speedgrader_ftree
fix_create_assessment_grading_deadline_initialization
fix_datepicker_initializing_bug
fix_issue_863
fix_logger
fix_pdf_annotation_borderbox_positioning
fix_setup_script_database_and_school_templates
fix_statistics
fix_user_ids
form_fixes
form_fixes_jacob
freeze_datepicker_version
grade_export_submission_time
hotfix_annotation_permissions
hotfix_annotations
hotfix_decouple_annotations_gradebook
hotfix_flicker_menus
hotfix_handin
hotfix_jobs
hotfix_multiple_annotations
hotfix_remaining_submissions
incorrect_favicon_link
leave_admin_option_open
moss_permissions
multi_tango
notifications_mvp
pdf_annotation_buttons
rails-5-docker-dev
rails-5-upgrade
remove_facebook
revert_contact_page_github_issue_link
scheduler_test_job
score_overhaul
setup_errors
style_fixes
switch_menu_side
tango_client_retry
tango_error_passthrough
test_external_pr
tjjohans_annotations
tjjohans_develop
tjjohans_error_audit_2018
type_fix
version_number_in_footer
2.2.1
2.2.0
2.1.0
2.0.8
v2.3.0
v2.2.1
v2.2.0
v2.0.8
v2.0.7
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/assets/javascripts/initialize_datetimepickers.js
+3
-3
app/assets/javascripts/initialize_datetimepickers.js
with
3 additions
and
3 deletions
app/assets/javascripts/initialize_datetimepickers.js
+
3
−
3
View file @
30424284
// Initialize all
Bootstrap 3
Datetime Pickers on the page
// Initialize all
Flatpicker
Datetime Pickers on the page
;(
function
()
{
$
(
document
).
ready
(
function
()
{
...
...
@@ -7,7 +7,7 @@
$
(
datetimeElts
[
i
]).
flatpickr
({
enableTime
:
true
,
altInput
:
true
,
defaultDate
:
new
Date
(
datetimeElts
[
i
]
.
getAttribute
(
"
value
"
))
defaultDate
:
new
Date
(
moment
(
$
(
datetimeElts
[
i
]
).
val
()
))
})
}
...
...
@@ -16,7 +16,7 @@
for
(
var
i
=
0
;
i
<
dateElts
.
length
;
i
++
)
{
$
(
dateElts
[
i
]).
flatpickr
({
altInput
:
true
,
defaultDate
:
moment
(
$
(
dateElts
[
i
]).
val
()).
format
(
"
MMMM D YYYY
"
)
defaultDate
:
new
Date
(
moment
(
$
(
dateElts
[
i
]).
val
()).
format
(
"
MMMM D YYYY
"
)
)
})
}
});
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets