Closed radirk closed 9 years ago
The datepicker should be working, you can create one as follows:
[:div {:field :datepicker :id :date :date-format "yyyy/mm/dd" :inline true}]
You also need to include the provided css for it to render correctly. It can be read as follows:
(defn resource [r]
(-> (Thread/currentThread)
(.getContextClassLoader)
(.getResource r)
slurp))
(resource "reagent-forms.css")
Then simply make sure it's included on the page, if you're using Selmer then it's something like
(render "page.html" {:datepicker-css (resource "reagent-forms.css")})
Then on the page:
<style>{{datepicker-css}}</style>
Ok, working now. My template definition was wrong. Thanks!
Also took me a while to learn that the date has to be passed as a hash: {:year 2014 :month 11 :day 24}. May help some people.
ah good point, I'll update the docs
Is the :datepicker field option working yet? Have tried different things and didn't get errors, but nothing displays on the page. An example would be very helpful. Thanks.