WIP: Implementation of stuff goes on

This commit is contained in:
Björn Fromme
2023-10-05 12:53:17 +02:00
parent 96d6170907
commit 1097b84447
23 changed files with 443 additions and 118 deletions
+1 -3
View File
@@ -6,7 +6,7 @@ import { German } from 'flatpickr/dist/l10n/de';
export default class extends Controller {
static targets = [ 'field' ]
static values = { format: String, minDate: String, maxDate: String, disableWeekends: Boolean, mode: String }
static values = { format: String, minDate: String, maxDate: String, disableWeekends: Boolean }
initialize() {
flatpickr.localize(German);
@@ -17,12 +17,10 @@ export default class extends Controller {
}
connect() {
const mode = this.modeValue || 'single'
const dateFormat = this.formatValue || 'd.m.Y'
const minDate = this.minDateValue
const maxDate = this.maxDateValue
const options = {
mode,
dateFormat: 'Y-m-d',
altInput: true,
altFormat: dateFormat,