From 666b159c37951a29d0fd0b8d52f2a240a04ad6a0 Mon Sep 17 00:00:00 2001 From: Art Wild Date: Wed, 22 Jun 2022 01:29:41 -0400 Subject: [PATCH] fixed daterange fields' names --- src/DatePickers.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DatePickers.jl b/src/DatePickers.jl index 43b38559..b6ae8398 100644 --- a/src/DatePickers.jl +++ b/src/DatePickers.jl @@ -14,14 +14,14 @@ register_normal_element("q__date", context = @__MODULE__) """ DateRange -Represents a date interval, between `start` and `stop`, with a 1 day step. +Represents a date interval, between `from` and `to`, with a 1 day step. """ Base.@kwdef mutable struct DateRange - start::Date = today() - stop::Date = today() + from::Date = today() + to::Date = today() end -DateRange(dr::StepRange{Date,Day}) = DateRange(dr.start, dr.stop) +DateRange(dr::StepRange{Date,Day}) = DateRange(dr.from, dr.to) """ datepicker() @@ -133,11 +133,11 @@ function Base.parse(::Type{Date}, d::String) :: Date end function Stipple.render(dr::DateRange, _::Union{Symbol,Nothing} = nothing) - Dict(:from => dr.start, :to => dr.stop) + Dict(:from => dr.from, :to => dr.to) end function Stipple.render(vdr::Vector{DateRange}, _::Union{Symbol,Nothing} = nothing) - [ Dict(:from => dr.start, :to => dr.stop) for dr in vdr ] + [ Dict(:from => dr.from, :to => dr.to) for dr in vdr ] end function Base.parse(::Type{DateRange}, d::Dict{String,Any})