GenieFramework / GenieFramework/StippleUI.jl

DateRange is not syncronized to the backend

Open
#73 10 comments 0 reactions 1 assignee Claimed by @AbhimanyuAryan View on GitHub
bug
Dominant language
Julia
Stars
90
Forks
16
PR merge metrics
No merged PRs in 30d

Description

```julia
using Stipple, StippleUI

@reactive mutable struct DatePickers <: ReactiveModel
date::R{Date} = today() + Day(30)
daterange::R{DateRange} = DateRange(today(), (today() + Day(3)))
end

function ui(model)
[
page(
model,
class = "container",
title = "Bug",
partial = true,
core_theme = true,
[
row(cell([h1("Date picker")]))
row(
[
cell([
datepicker(:date),
])
cell([
datepicker(:daterange, range = true),
])
],
)
],
),
]
end

model = DatePickers |> init

route("/") do
html(ui(model), context = @__MODULE__)
end

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 work `model.daterange[]`.

```
[c43c736e] Genie v4.18.1
[4acbeb90] Stipple v0.24.4
[ec984513] StipplePlotly v0.12.4
[a3c5d34a] StippleUI v0.19.4
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.