Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
ff5a5395
Commit
ff5a5395
authored
Jun 23, 2015
by
Paul Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #902 from pawl/fix_datepicker100
default datetime picker's time to current time when field is blank
parents
bd903950
1a18f867
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
form-1.0.0.js
flask_admin/static/admin/js/form-1.0.0.js
+7
-0
No files found.
flask_admin/static/admin/js/form-1.0.0.js
View file @
ff5a5395
...
...
@@ -371,6 +371,13 @@
function
(
start
,
end
)
{
$
(
'.filter-val'
).
trigger
(
"change"
);
});
$el
.
on
(
'show.daterangepicker'
,
function
(
event
,
data
)
{
if
(
$el
.
val
()
==
""
)
{
var
now
=
moment
().
seconds
(
0
);
// set seconds to 0
// change datetime to current time if field is blank
$el
.
data
(
'daterangepicker'
).
setCustomDates
(
now
,
now
);
}
});
return
true
;
case
'datetimerangepicker'
:
$el
.
daterangepicker
({
...
...
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