Genie Discord forum

Author AvatarMordegai
7/12/2023, 1:13:27 PM

I built a very simple app with a date picker that should alter the text in 2 text components when the date changes. However, nothing happens at all!

This is the code:

module App using GenieFramework using Dates @genietools

@app begin # reactive variables are tagged with @in and @out @in consumption_date = today()

@out consumed_on = ""
@out consuming = ""

# watch a variable and execute a block of code when
# its value changes
@onchange consumption_date begin
    consumed_on = "consumed_on a date"
    consuming = "consuming a date"

    @show "Change happened"
end

end

@page("/", "app.jl.html") end

and this is the html:

Happonomy cockpit

Consumption date

Consumed on

Consuming

Not even the "Change happened" string is displayed.

Author AvatarPere
7/12/2023, 2:00:10 PM

The issue probably is that the q-date component is missing the maskparameter. It should be

Here's an example for the date picker:

https://learn.geniecloud.io/docs/reactive-ui/components/date-picker

Please let me know if that fixes it. We'll soon fix the datepicker component to include the mask parameter by default.

Author AvatarMordegai
7/12/2023, 2:17:17 PM

Yes! That worked! Thank you!