|
@@ -2,7 +2,7 @@
|
|
<el-input
|
|
<el-input
|
|
class="el-date-editor"
|
|
class="el-date-editor"
|
|
:class="'el-date-editor--' + type"
|
|
:class="'el-date-editor--' + type"
|
|
- :readonly="!editable || readonly || type === 'dates'"
|
|
|
|
|
|
+ :readonly="!editable || readonly || type === 'dates' || type === 'week'"
|
|
:disabled="pickerDisabled"
|
|
:disabled="pickerDisabled"
|
|
:size="pickerSize"
|
|
:size="pickerSize"
|
|
:name="name"
|
|
:name="name"
|
|
@@ -190,17 +190,9 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|
: date.replace(/W/, week);
|
|
: date.replace(/W/, week);
|
|
return date;
|
|
return date;
|
|
},
|
|
},
|
|
- parser(text) {
|
|
|
|
- const array = (text || '').split('w');
|
|
|
|
- if (array.length === 2) {
|
|
|
|
- const year = Number(array[0]);
|
|
|
|
- const month = Number(array[1]);
|
|
|
|
-
|
|
|
|
- if (!isNaN(year) && !isNaN(month) && month < 54) {
|
|
|
|
- return text;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return null;
|
|
|
|
|
|
+ parser(text, format) {
|
|
|
|
+ // parse as if a normal date
|
|
|
|
+ return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
date: {
|
|
date: {
|