mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	change date
This commit is contained in:
		@@ -17,4 +17,24 @@ SPDX-License-Identifier: GPL-3.0-or-later
 | 
			
		||||
    </form>
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
<script>
 | 
			
		||||
  var date_end = document.getElementById("id_date_end");
 | 
			
		||||
  var date_start = document.getElementById("id_date_start");
 | 
			
		||||
  
 | 
			
		||||
  function update_date_end (){
 | 
			
		||||
    if(date_end.value=="" || date_end.value<date_start.value){
 | 
			
		||||
      date_end.value = date_start.value;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  function update_date_start (){
 | 
			
		||||
    if(date_start.value=="" || date_end.value<date_start.value){
 | 
			
		||||
      date_start.value = date_end.value;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  date_start.addEventListener('focusout', update_date_end);
 | 
			
		||||
  date_end.addEventListener('focusout', update_date_start);
 | 
			
		||||
  
 | 
			
		||||
</script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user