mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 09:20:35 +03:00
添加inputClass , 修复cell, placaholder
This commit is contained in:
@@ -61,6 +61,7 @@ export default {
|
|||||||
| shortcuts | Boolean/Array | true | the shortcuts for the range picker |
|
| shortcuts | Boolean/Array | true | the shortcuts for the range picker |
|
||||||
| first-day-of-week | Number | 7 | set the first day of week (1-7) |
|
| first-day-of-week | Number | 7 | set the first day of week (1-7) |
|
||||||
| minute-step | Number | 0 | if > 0 don't show the second picker(0 - 60) |
|
| minute-step | Number | 0 | if > 0 don't show the second picker(0 - 60) |
|
||||||
|
| input-class | String | 'input' | the input class name |
|
||||||
|
|
||||||
|
|
||||||
## shortcuts
|
## shortcuts
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export default {
|
|||||||
const date = new Date(time.getFullYear(), time.getMonth(), day, 0, 0, 0)
|
const date = new Date(time.getFullYear(), time.getMonth(), day, 0, 0, 0)
|
||||||
date.setDate(day)
|
date.setDate(day)
|
||||||
return {
|
return {
|
||||||
title: date.toLocaleString(),
|
title: date.toLocaleDateString(),
|
||||||
date,
|
date,
|
||||||
day,
|
day,
|
||||||
classes
|
classes
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
:style="{'width': width + 'px','min-width':range ? (type === 'datetime' ? '320px' : '210px') : '140px'}"
|
:style="{'width': width + 'px','min-width':range ? (type === 'datetime' ? '320px' : '210px') : '140px'}"
|
||||||
v-clickoutside="closePopup">
|
v-clickoutside="closePopup">
|
||||||
<input readonly
|
<input readonly
|
||||||
class="input"
|
:class="inputClass"
|
||||||
:value="text"
|
:value="text"
|
||||||
:placeholder="innerPlaceholder"
|
:placeholder="innerPlaceholder"
|
||||||
ref="input"
|
ref="input"
|
||||||
@@ -103,6 +103,10 @@ export default {
|
|||||||
confirm: {
|
confirm: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
inputClass: {
|
||||||
|
type: String,
|
||||||
|
default: 'input'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|||||||
Reference in New Issue
Block a user