using own fullcalendar component
This commit is contained in:
36
dashboard/callbacks/appointments_callbacks.py
Normal file
36
dashboard/callbacks/appointments_callbacks.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# dashboard/callbacks/appointments_callbacks.py
|
||||
import sys
|
||||
sys.path.append('/workspace')
|
||||
from dash import Input, Output, State, callback, ctx, dash
|
||||
from flask import session
|
||||
import json
|
||||
|
||||
print("appointments_callbacks.py geladen")
|
||||
|
||||
@callback(
|
||||
dash.Output('output', 'children'),
|
||||
dash.Input('calendar', 'lastDateClick')
|
||||
)
|
||||
def display_date(date_str):
|
||||
if date_str:
|
||||
return f"Letzter Klick auf: {date_str}"
|
||||
return "Klicke auf ein Datum im Kalender!"
|
||||
|
||||
@callback(
|
||||
dash.Output('event-output', 'children'),
|
||||
dash.Input('calendar', 'lastEventClick')
|
||||
)
|
||||
def display_event(event_id):
|
||||
if event_id:
|
||||
return f"Letztes Event geklickt: {event_id}"
|
||||
return "Klicke auf ein Event im Kalender!"
|
||||
|
||||
@callback(
|
||||
dash.Output('select-output', 'children'),
|
||||
dash.Input('calendar', 'lastSelect')
|
||||
)
|
||||
def display_select(select_info):
|
||||
if select_info:
|
||||
return f"Markiert: {select_info['start']} bis {select_info['end']} (ganztägig: {select_info['allDay']})"
|
||||
return "Markiere einen Bereich im Kalender!"
|
||||
|
||||
Reference in New Issue
Block a user