RangePicker view
A calendar with two ends and a running account of what they add up to.
A view survives a frame. Hold it in an Entity with cx.new(..) and reach it with .update(..).
use gpui_kit::datetime::RangePicker;
Construct
new(ident: impl Into<Ident>, adapter: SharedDateAdapter, window: &mut Window, cx: &mut Context<Self>) -> SelfOptions
Chain onto the value.
range(range: DayRange) -> SelfCommands
Need a Context, so they need a view.
set_overlay(overlay: impl Fn(Day) -> Option<DayMark> + 'static, cx: &mut Context<Self>)
set_range(range: Option<DayRange>, cx: &mut Context<Self>)
set_disabled(disabled: bool, cx: &mut Context<Self>)Queries
Only answer; they change nothing.
calendar() -> &Entity<Calendar>
state() -> RangeState
blocked() -> BlockedReportReports
The variants of the event it emits. It never applies the change itself.
- StartPicked
- EndPicked
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.