Добавлена возможность оставить пустое поле даты
This commit is contained in:
		@@ -856,7 +856,10 @@ class SmartDateField
 | 
			
		||||
        
 | 
			
		||||
        this._field.addEventListener('blur', function () {
 | 
			
		||||
            _this.correctValue(true);
 | 
			
		||||
            _this.returnLastCorrectValue();
 | 
			
		||||
 | 
			
		||||
            if (!_this._isEmptyValue(_this._field.value)) {
 | 
			
		||||
                _this.returnLastCorrectValue();
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
@@ -898,7 +901,7 @@ class SmartDateField
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        this._setValueToFieled(parsedValue);
 | 
			
		||||
        this._setValueToField(parsedValue);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    setValue(value)
 | 
			
		||||
@@ -931,7 +934,7 @@ class SmartDateField
 | 
			
		||||
        return this._formatter.getCorrectedValue();
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    _setValueToFieled(newValue)
 | 
			
		||||
    _setValueToField(newValue)
 | 
			
		||||
    {
 | 
			
		||||
        let position = this._field.selectionStart;
 | 
			
		||||
        let isAtEnd = (position === this._field.value.length);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								es6/smart-date.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								es6/smart-date.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user