fullcalendar_documentation.py 552 B

1234567891011121314151617181920212223
  1. from nicegui import ui
  2. from . import doc
  3. @doc.demo(ui.fullcalendar)
  4. def main_demo() -> None:
  5. options = {
  6. 'initialView': 'dayGridMonth',
  7. 'headerToolbar': {'left': 'title', 'right': ''},
  8. 'footerToolbar': {'right': 'prev,next today'},
  9. 'slotMinTime': '05:00:00',
  10. 'slotMaxTime': '22:00:00',
  11. 'allDaySlot': False,
  12. 'timeZone': 'local',
  13. 'height': 'auto',
  14. 'width': 'auto',
  15. 'events': [],
  16. }
  17. ui.fullcalendar(options, on_click=ui.notify)
  18. doc.reference(ui.fullcalendar)