Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4ac30a85
authored
Jan 10, 2018
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the erase date
parent
79662727
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
src/main/webapp/WEB-INF/templates/golf/resourcePriceForm.ftl
src/main/webapp/resource/datepickerRefactor/js/jquery.ui.datepickerRefactor.js
src/main/webapp/WEB-INF/templates/golf/resourcePriceForm.ftl
View file @
4ac30a85
...
...
@@ -82,9 +82,9 @@ $(function () {
<label class="control-label" for="theDate">时间</label>
<div class="controls" style="">
<#if id??>
<input id="theDate" name="theDate" value="${form.theDate??}" placeholder="时间" class="datepicker input-medium" required="" type="text"
readonly
/>
<input id="theDate" name="theDate" value="${form.theDate??}" placeholder="时间" class="datepicker input-medium" required="" type="text" />
<#else>
<input id="theDate" name="theDate" value="" placeholder="时间" class="datepicker input-medium" required="" type="text"
readonly
/>
<input id="theDate" name="theDate" value="" placeholder="时间" class="datepicker input-medium" required="" type="text" />
<div class="pp" style="background-image:url(${staticServer}/pic/calendar.jpg);width: 40px;height: 30px;">
</#if>
...
...
src/main/webapp/resource/datepickerRefactor/js/jquery.ui.datepickerRefactor.js
View file @
4ac30a85
...
...
@@ -11,6 +11,7 @@
* jquery.ui.core.js
*/
var
$targetVal
;
var
targetDateInput
;
(
function
(
$
,
undefined
)
{
...
...
@@ -617,11 +618,23 @@ $.extend(Datepicker.prototype, {
//}
//return true;
},
_eraseAllData
:
function
(){
$
(
".ui-datepicker-calendar"
).
find
(
"a"
).
each
(
function
(){
var
action
=
$
(
this
).
attr
(
"action"
);
if
(
$targetVal
.
indexOf
(
action
)
>=
0
){
$
(
this
).
css
({
background
:
"#e6e6e6"
});
$
(
this
).
data
(
"picker"
,{
clicked
:
false
});
}
});
},
/* Pop-up the date picker for a given input field.
@param input element - the input field attached to the date picker or
event - if triggered by focus */
_showDatepicker
:
function
(
input
)
{
if
(
!
targetDateInput
.
val
()){
$
.
datepicker
.
_eraseAllData
();
}
input
=
input
.
target
||
input
;
if
(
input
.
nodeName
.
toLowerCase
()
!=
'input'
)
// find from button/image trigger
input
=
$
(
'input'
,
input
.
parentNode
)[
0
];
...
...
@@ -630,7 +643,7 @@ $.extend(Datepicker.prototype, {
var
inst
=
$
.
datepicker
.
_getInst
(
input
);
if
(
$
.
datepicker
.
_curInst
&&
$
.
datepicker
.
_curInst
!=
inst
)
{
$
.
datepicker
.
_curInst
.
dpDiv
.
stop
(
true
,
true
);
}
}
var
beforeShow
=
$
.
datepicker
.
_get
(
inst
,
'beforeShow'
);
extendRemove
(
inst
.
settings
,
(
beforeShow
?
beforeShow
.
apply
(
input
,
[
input
,
inst
])
:
{}));
inst
.
lastVal
=
null
;
...
...
@@ -1831,7 +1844,7 @@ $(function(){
$this
.
append
(
$input
);
targetDateInput
=
$
(
opts
.
target
);
//$(".picInput").datepicker().change(function(){
$this
.
find
(
'.picInput'
).
datepicker
().
change
(
function
(){
...
...
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