in progreess date fixes.
This commit is contained in:
@@ -395,14 +395,28 @@
|
||||
:max outstanding-balance
|
||||
:step "0.01"}]]]]]])]]])))
|
||||
|
||||
#_(defn date-picker []
|
||||
(let [cal (r/atom nil)]
|
||||
(r/create-class
|
||||
{:component-did-mount (fn [this]
|
||||
|
||||
(reset! cal (new bc (r/dom-node this) (clj->js {:overlay false :dateFormat "mm/dd/yyyy"} )))
|
||||
nil)
|
||||
|
||||
:component-will-unmount (fn [this]
|
||||
(.hide @cal)
|
||||
nil)
|
||||
:reagent-render (fn [props]
|
||||
[:input ])})))
|
||||
(defn my-date [props]
|
||||
(let [cal (r/atom nil)]
|
||||
(r/create-class
|
||||
{:component-did-mount (fn [this]
|
||||
(reset! cal (new bc (r/dom-node this) (clj->js {:overlay false :dateFormat "mm/dd/yyyy"} )))
|
||||
(reset! cal (new bc (r/dom-node this) (clj->js {:overlay false :dateFormat "yyyy-mm-dd"} )))
|
||||
|
||||
nil)
|
||||
:reagent-render (fn [props]
|
||||
[:input.input (merge props {:on-blur (fn [] (js/setTimeout 100 #(.hide @cal)) )}) ])})))
|
||||
[:input.input (merge props {:on-blur (fn [] (js/setTimeout 100 #(.hide @cal)) )}) ])})))
|
||||
|
||||
|
||||
|
||||
@@ -432,7 +446,7 @@
|
||||
|
||||
|
||||
[bind-field
|
||||
[my-date {:type "text"
|
||||
[my-date {:type "date"
|
||||
:field [:date]
|
||||
:event change-event
|
||||
:spec ::invoice/date
|
||||
|
||||
Reference in New Issue
Block a user