transaction date range. Need to generalize filter changing.

This commit is contained in:
Bryce Covert
2019-05-03 07:54:21 -07:00
parent b176647585
commit 34751fe77a
6 changed files with 89 additions and 5 deletions

View File

@@ -0,0 +1,38 @@
(ns auto-ap.views.components.date-range-filter
(:require
[clojure.spec.alpha :as s]
[auto-ap.entities.invoice :as invoice]
[auto-ap.views.components.typeahead :refer [typeahead]]
[auto-ap.views.utils :refer [bind-field date-picker]]))
(defn date-range-filter [{:keys [value on-change-event]}]
[:div.field
[:div.control
[:div.columns.is-variable.is-1
[:div.column
[bind-field
[date-picker {:class-name "input is-fullwidth"
:class "input"
:format-week-number (fn [] "")
:previous-month-button-label ""
:placeholder "Start Date mm/dd/yyyy"
:next-month-button-label ""
:next-month-label ""
:event on-change-event
:type "date"
:field [:start]
:subscription value}]]]
[:div.column.is-narrow " to "]
[:div.column
[bind-field
[date-picker {:class-name "input is-fullwidth"
:class "input"
:format-week-number (fn [] "")
:previous-month-button-label ""
:placeholder "Start Date mm/dd/yyyy"
:next-month-button-label ""
:event on-change-event
:next-month-label ""
:type "date"
:field [:end]
:subscription value}]]]]]])