Przeglądaj źródła

added the ability to get all current events

frankvp11 1 rok temu
rodzic
commit
382ef5c392

+ 2 - 0
nicegui/elements/fullcalendar.py

@@ -34,4 +34,6 @@ class FullCalendar(Element, component='fullcalendar.js', libraries=['lib/fullcal
 
         super().update()
         self.run_method('update_calendar')
+    def get_events(self):
+        return self._props['options']['events']
         

+ 1 - 0
website/more_documentation/fullcalendar_test.py

@@ -42,4 +42,5 @@ def add_event():
 
 fullcal = create_fullcalendar()
 ui.button("Click me to add event", on_click=add_event)
+ui.button("Print out all the events", on_click=lambda: print(fullcal.get_events()))
 ui.run()