update DatePicker
update DatePicker
This commit is contained in:
parent
7c5ccdab4d
commit
3602b78df8
4 changed files with 14 additions and 9 deletions
BIN
assets/iview.png
BIN
assets/iview.png
Binary file not shown.
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 164 KiB |
|
@ -67,10 +67,10 @@
|
|||
if (newVal && !oldVal) {
|
||||
this.rangeState.selecting = false;
|
||||
this.markRange(newVal);
|
||||
this.$emit('on-pick', {
|
||||
minDate: this.minDate,
|
||||
maxDate: this.maxDate
|
||||
});
|
||||
// this.$emit('on-pick', {
|
||||
// minDate: this.minDate,
|
||||
// maxDate: this.maxDate
|
||||
// });
|
||||
}
|
||||
},
|
||||
cells: {
|
||||
|
|
|
@ -265,14 +265,18 @@
|
|||
|
||||
const parsedValue = parser(value, format);
|
||||
|
||||
if (parsedValue) {
|
||||
if (parsedValue[0] instanceof Date && parsedValue[1] instanceof Date) {
|
||||
if (parsedValue[0].getTime() > parsedValue[1].getTime()) {
|
||||
correctValue = oldValue;
|
||||
} else {
|
||||
// todo 判断disabledDate
|
||||
correctValue = formatter(parsedValue, format);
|
||||
}
|
||||
} else {
|
||||
correctValue = oldValue;
|
||||
}
|
||||
|
||||
correctDate = parsedValue;
|
||||
correctDate = parser(correctValue, format);
|
||||
} else {
|
||||
const parsedDate = parseDate(value, format);
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
align="right"
|
||||
:editable="true"
|
||||
:format="format"
|
||||
@on-change="change"
|
||||
:options="options2"></date-picker>
|
||||
</i-col>
|
||||
</row>
|
||||
|
@ -134,7 +135,7 @@
|
|||
computed: {},
|
||||
methods: {
|
||||
change (date) {
|
||||
console.log(date)
|
||||
// console.log(date)
|
||||
},
|
||||
change2 (s) {
|
||||
// console.log(s)
|
||||
|
|
Loading…
Add table
Reference in a new issue