Commit 4508f2a6 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

DatePicker: fix range in Chromium 53 - 57

parent 9b6a2107
......@@ -8,9 +8,7 @@ git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element
SUB_FOLDER='1.4'
mkdir $SUB_FOLDER
# rm -rf *.js *.css *.map static
rm -rf $SUB_FOLDER/**
# cp -rf ../../examples/element-ui/** .
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
cd ../..
......
......@@ -259,11 +259,7 @@
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = _ => {
if (xhr.readyState === 4 && xhr.status === 200) {
const versions = JSON.parse(xhr.responseText);
this.versions = Object.keys(versions).slice(-2).reduce((prev, next) => {
prev[next] = versions[next];
return prev;
}, {});
this.versions = JSON.parse(xhr.responseText);
}
};
xhr.open('GET', '/versions.json');
......
......@@ -42,8 +42,8 @@ Typical configurations for these config files are:
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"element-ui": "^1.4.0",
"vue": "^2.3.0"
"element-ui": "legacy",
"vue": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.0.0",
......
......@@ -42,8 +42,8 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"element-ui": "^1.4.0",
"vue": "^2.3.0"
"element-ui": "legacy",
"vue": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.0.0",
......
......@@ -387,6 +387,13 @@
this.onPick && this.onPick(val);
this.maxDate = val.maxDate;
this.minDate = val.minDate;
// workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
setTimeout(() => {
this.maxDate = val.maxDate;
this.minDate = val.minDate;
}, 10);
if (!close || this.showTime) return;
this.handleConfirm();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment