A Hoplon wrapper for the jQuery date range picker plugin.
[hoplon/jquery-daterange-picker "0.0.8-2"] ;; latest release
Simple example page using it in a page:
(page "index.html"
(:require
[hoplon.jquery.daterangepicker :refer [daterange]]))
(html
(head)
(body
(daterange)))
The value can be bound to a Javelin cell:
(defc selected-dates nil)
...
(daterange :state selected-dates)
Options may be passed to the constructor via the :opts
attribute:
(daterange :opts {:autoClose true})
Options (or anything else) can be bound to cells responsively:
(defc auto-close? true)
...
(daterange :opts (cell= {:autoClose auto-close?}))
The date picker custom events can be used directly, if necessary:
(daterange :datepicker-change #(js/alert "thanks for picking a date!"))
Copyright © 2014, Alan Dipert and Micha Niskin
Distributed under the Eclipse Public License, the same as Clojure