fixes invoice date filtering
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
(ns auto-ap.ssr.components.date-range
|
||||
(:require [auto-ap.ssr.components :as com]
|
||||
[auto-ap.ssr.components.buttons :as but]
|
||||
[auto-ap.ssr.svg :as svg]
|
||||
[auto-ap.time :as atime]
|
||||
[clj-time.coerce :as c]
|
||||
[clj-time.core :as t]
|
||||
[clj-time.periodic :as per]))
|
||||
|
||||
(defn date-range-field [{:keys [value id]}]
|
||||
(defn date-range-field [{:keys [value id apply-button?]}]
|
||||
[:div {:id id}
|
||||
(com/field {:label "Date Range"}
|
||||
[:div.space-y-4
|
||||
@@ -21,11 +23,17 @@
|
||||
(atime/unparse-local atime/normal-date))
|
||||
:placeholder "Date"
|
||||
:size :small
|
||||
:class "shrink"})
|
||||
:class "shrink date-filter-input"})
|
||||
|
||||
(com/date-input {:name "end-date"
|
||||
:value (some-> (:end value)
|
||||
(atime/unparse-local atime/normal-date))
|
||||
:placeholder "Date"
|
||||
:size :small
|
||||
:class "shrink"})]])])
|
||||
:class "shrink date-filter-input"})
|
||||
(when apply-button?
|
||||
(but/button- {:color :secondary
|
||||
:size :small
|
||||
:type "button"
|
||||
"x-on:click" "$dispatch('datesApplied')"}
|
||||
"Apply"))]])])
|
||||
|
||||
Reference in New Issue
Block a user