Skip to content

Commit

Permalink
Set value to an empty string in case the date is nil (#115)
Browse files Browse the repository at this point in the history
This change in React facebook/react#5013
causes the warning message if the value of an input is null.
  • Loading branch information
asok authored and yogthos committed Oct 28, 2016
1 parent d5b7dae commit 4504543
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reagent_forms/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@
:on-click #(do
(.preventDefault %)
(swap! expanded? not))
:value (when-let [date (get id)] (format-date date fmt))}
:value (if-let [date (get id)]
(format-date date fmt)
"")}
(clean-attrs attrs))]
[:span.input-group-addon
{:on-click #(do
Expand Down

0 comments on commit 4504543

Please sign in to comment.