|
@@ -406,11 +406,11 @@
|
|
|
|
|
|
visibleDate: {
|
|
|
get() {
|
|
|
- return formatDate(this.date);
|
|
|
+ return formatDate(this.date, this.dateFormat);
|
|
|
},
|
|
|
|
|
|
set(val) {
|
|
|
- const date = parseDate(val, 'yyyy-MM-dd');
|
|
|
+ const date = parseDate(val, this.dateFormat);
|
|
|
if (!date) {
|
|
|
return;
|
|
|
}
|
|
@@ -445,6 +445,14 @@
|
|
|
} else {
|
|
|
return 'HH:mm:ss';
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ dateFormat() {
|
|
|
+ if (this.format) {
|
|
|
+ return this.format.replace('HH:mm', '').replace(':ss', '').trim();
|
|
|
+ } else {
|
|
|
+ return 'yyyy-MM-dd';
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|