Skip to main content

Form / Date Picker / Trigger

To handle live changes to a date picker, enable the trigger attribute.

from typing import Optional
from h2o_wave import main, app, Q, ui

def get_form_items(value: Optional[str]):
return [
ui.date_picker(name='date_trigger', label='Pick a date', trigger=True),

async def serve(q: Q):
if not q.client.initialized:['example'] = ui.form_card(box='1 1 4 5', items=get_form_items(None))
q.client.initialized = True
else:['example'].items = get_form_items(q.args.date_trigger)

Tags:  date_pickerformtrigger