Skip to content

save range date variable #332

Closed Answered by falkoschindler
bderkk asked this question in Q&A
Discussion options

You must be logged in to vote

How about this:

x = None
y = None

def handle_date_range(event) -> None:
    global x, y
    x = event.value['from']
    y = event.value['to']
    print(x, y, flush=True)

ui.date(on_change=handle_date_range).props('range')

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@bderkk
Comment options

Comment options

You must be logged in to vote
1 reply
@bderkk
Comment options

Answer selected by bderkk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #328 on February 01, 2023 07:08.