fix DatePicker and Select bug

pull/5289/head
Leopoldthecoder 2017-06-06 23:02:02 +08:00 committed by 杨奕
parent f9b19d9aa1
commit cb2e43f696
2 changed files with 2 additions and 4 deletions

View File

@ -32,9 +32,7 @@
const WEEKS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; const WEEKS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
const clearHours = function(time) { const clearHours = function(time) {
const cloneDate = new Date(time); const cloneDate = new Date(time);
const timeZoneOffset = cloneDate.getTimezoneOffset(); cloneDate.setHours(0, 0, 0, 0);
const timeZone = timeZoneOffset >= 0 ? 24 - timeZoneOffset / 60 : Math.abs(timeZoneOffset) / 60;
cloneDate.setHours(timeZone, 0, 0, 0);
return cloneDate.getTime(); return cloneDate.getTime();
}; };

View File

@ -121,7 +121,7 @@ const createStyles = function() {
// opacity: 0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360 // opacity: 0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
const css = `${animationKeyframes} const css = `${animationKeyframes}
.resize-triggers { ${animationStyle} visibility: hidden; opacity: 0; } .resize-triggers { ${animationStyle} visibility: hidden; opacity: 0; }
.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1 }
.resize-triggers > div { background: #eee; overflow: auto; } .resize-triggers > div { background: #eee; overflow: auto; }
.contract-trigger:before { width: 200%; height: 200%; }`; .contract-trigger:before { width: 200%; height: 200%; }`;