PageSourceSearch

https://www.ekmd.de/assetm/controllers/events_form_controller-a755548c8f071d1eefe30ae5f1e0bc6e.js

js ekmd.de collected 2026-10-09 22:39:58 UTC 1,363 bytes, 58 lines download raw bytes

1import { Controller } from '@hotwired/stimulus'
2
3/* stimulusFetch: 'lazy' */
4export default class extends Controller {
5  static values = {
6    ajax: true
7  }
8
9  onChangeStartdateField(e) {
10    let startdate = this.element.elements['startdate']
11    let enddate = this.element.elements['enddate']
12    let value = startdate.value
13
14    if ( value ) {
15      enddate.min = value
16    }
17    else {
18      startdate.min = enddate.min = this.getCurrentDate()
19    }
20  }
21
22  onChangeEnddateField(e) {
23    let startdate = this.element.elements['startdate']
24    let enddate = this.element.elements['enddate']
25
26    if ( enddate.value ) {
27      startdate.max = enddate.value
28    }
29    else {
30      startdate.max = null
31      enddate.min = startdate.value || this.getCurrentDate()
32    }
33  }
34
35  onSubmitFilterForm(e) {
36    if ( !this.ajaxValue ) {
37      return
38    }
39
40    e.preventDefault()
41    const formData = new FormData(this.element)
42
43    document.dispatchEvent(new CustomEvent('filterFormSubmitted', {
44      detail: {
45        startdate: formData.get('startdate'),
46        enddate: formData.get('enddate')
47      }
48    }))
49  }
50
51  getCurrentDate() {
52    const today = new Date()
53    const year = today.getFullYear()
54    const month = String(today.getMonth() + 1).padStart(2, '0')
55    const day = String(today.getDate()).padStart(2, '0')
56    return `${year}-${month}-${day}`
57  }
58}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.