projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
230a3a5
)
Roo/bootstrap/form/TimeField.js
author
leon
<leon@roojs.com>
Thu, 23 Feb 2023 07:55:52 +0000
(15:55 +0800)
committer
leon
<leon@roojs.com>
Thu, 23 Feb 2023 07:55:52 +0000
(15:55 +0800)
Roo/bootstrap/form/TimeField.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/form/TimeField.js
b/Roo/bootstrap/form/TimeField.js
index
0aca555
..
8c39274
100644
(file)
--- a/
Roo/bootstrap/form/TimeField.js
+++ b/
Roo/bootstrap/form/TimeField.js
@@
-283,9
+283,7
@@
Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input, {
if(typeof(this.time) === 'undefined') {
this.time = new Date();
if(typeof(this.time) === 'undefined') {
this.time = new Date();
- var oldMinute = parseInt(this.time.format('i'));
- var newMinute = Math.round(parseInt(this.time.format('i')) / this.minuteStep) * this.minuteStep;
- this.time = this.time.add(Date.MINUTE, newMinute - oldMinute);
+ this.time = this.time.add(Date.MINUTE, Math.round(parseInt(this.time.format('i')) / this.minuteStep) * this.minuteStep - parseInt(this.time.format('i')));
}
this.time = (typeof(this.time) === 'undefined') ? new Date() : this.time;
}
this.time = (typeof(this.time) === 'undefined') ? new Date() : this.time;