mirror of https://github.com/ElemeFE/element
				
				
				
			DatePicker: fix marks are displaced when type is range, fixed #2612
							parent
							
								
									c310ee5661
								
							
						
					
					
						commit
						5fc34777b7
					
				| 
						 | 
				
			
			@ -118,6 +118,6 @@ if (isProd) {
 | 
			
		|||
cooking.add('plugin.CopyWebpackPlugin', new CopyWebpackPlugin([
 | 
			
		||||
  { from: 'examples/versions.json' }
 | 
			
		||||
]));
 | 
			
		||||
cooking.add('plugin.OfflinePlugin', new OfflinePlugin());
 | 
			
		||||
isProd && cooking.add('plugin.OfflinePlugin', new OfflinePlugin());
 | 
			
		||||
cooking.add('vue.preserveWhitespace', false);
 | 
			
		||||
module.exports = cooking.resolve();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -270,7 +270,7 @@
 | 
			
		|||
      getDateOfCell(row, column) {
 | 
			
		||||
        const startDate = this.startDate;
 | 
			
		||||
 | 
			
		||||
        return new Date(startDate.getTime() + (row * 7 + (column - (this.showWeekNumber ? 1 : 0))) * DAY_DURATION);
 | 
			
		||||
        return new Date(startDate.getTime() + (row * 7 + (column - (this.showWeekNumber ? 1 : 0)) - this.offsetDay) * DAY_DURATION);
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      getCellByDate(date) {
 | 
			
		||||
| 
						 | 
				
			
			@ -322,7 +322,7 @@
 | 
			
		|||
 | 
			
		||||
            const cell = row[j];
 | 
			
		||||
            const index = i * 7 + j + (this.showWeekNumber ? -1 : 0);
 | 
			
		||||
            const time = startDate.getTime() + DAY_DURATION * index;
 | 
			
		||||
            const time = startDate.getTime() + DAY_DURATION * (index - this.offsetDay);
 | 
			
		||||
 | 
			
		||||
            cell.inRange = minDate && time >= clearHours(minDate) && time <= clearHours(maxDate);
 | 
			
		||||
            cell.start = minDate && time === clearHours(minDate.getTime());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue