sadais-piui 1.2.7-beta82 → 1.2.7-beta83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -227,13 +227,15 @@ export default {
|
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
data() {
|
|
230
|
-
|
|
230
|
+
let date = this.$pi.date.parseDate(this.defaultValue)
|
|
231
231
|
if(this.field === 'halfday') {
|
|
232
|
+
const time = date.time
|
|
232
233
|
if(date.hour < 12){
|
|
233
|
-
|
|
234
|
+
time.setHours(0)
|
|
234
235
|
} else {
|
|
235
|
-
|
|
236
|
+
time.setHours(12)
|
|
236
237
|
}
|
|
238
|
+
date = this.$pi.date.parseDate(time)
|
|
237
239
|
}
|
|
238
240
|
return {
|
|
239
241
|
date,
|
|
@@ -423,11 +425,13 @@ export default {
|
|
|
423
425
|
init() {
|
|
424
426
|
this.date = this.$pi.date.parseDate(this.defaultValue)
|
|
425
427
|
if(this.field === 'halfday') {
|
|
428
|
+
const time = this.date.time
|
|
426
429
|
if(this.date.hour < 12){
|
|
427
|
-
|
|
430
|
+
time.setHours(0)
|
|
428
431
|
} else {
|
|
429
|
-
|
|
432
|
+
time.setHours(12)
|
|
430
433
|
}
|
|
434
|
+
this.date = this.$pi.date.parseDate(time)
|
|
431
435
|
}
|
|
432
436
|
},
|
|
433
437
|
handlePickstart() {
|
|
@@ -482,6 +486,7 @@ export default {
|
|
|
482
486
|
const time = this.date.time
|
|
483
487
|
time.setMinutes(0)
|
|
484
488
|
time.setSeconds(0)
|
|
489
|
+
time.setMilliseconds(0)
|
|
485
490
|
this.date = this.$pi.date.parseDate(time)
|
|
486
491
|
}
|
|
487
492
|
const value = this.format ? this.date.format(this.format) : this.date
|