-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateRange is not syncronized to the backend #73
Comments
yes looks like a bug. Thanks for reporting |
When I change dates via the UI and it does not fire the "on" model.daterange |
thanks for reporting. I think there's something off with DateRange. I'll work on it today and debug the problem |
I have this issue also :
|
never fires change in observer |
It seems to be that the back channel (view to backend) does not work properly. |
if I programmatically set the daterange[] it fires the observer. I was thinking the widget needs to "close" or "okay" when it sets new daterange. I have not look yet - but I intend to. |
Maybe something goes wrong in the update |
This is meanwhile fixed. A modern app would look like this using Stipple, StippleUI
@app begin
@in date = today() + Day(30)
@in daterange = DateRange(today(), (today() + Day(3)))
@onchange date begin
@notify("Date changed to: $date")
end
@onchange daterange begin
@notify("Date range changed to: $daterange")
end
end
ui() = [
row(cell([h1("Date picker")]))
row([
cell(datepicker(:date))
cell(datepicker(:daterange, range = true))
])
]
@page("/", ui, layout = Stipple.ReactiveTools.DEFAULT_LAYOUT(title = "Date Picker"))
up() |
Changing the date range via the REPL updates the view
model.daterange[] = DateRange(Date("2022-07-01"), Date("2022-07-05"))
but the other way around does not workmodel.daterange[]
.The text was updated successfully, but these errors were encountered: