Skip to content

hoplon/jquery.daterangepicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 10, 2017
136275e · Jan 10, 2017

History

7 Commits
Jan 3, 2017
Sep 22, 2015
Jan 10, 2017
Jan 10, 2017
Jan 10, 2017

Repository files navigation

jquery.daterangepicker

A Hoplon wrapper for the jQuery date range picker plugin.

Dependency

[hoplon/jquery-daterange-picker "0.0.8-2"] ;; latest release

Usage

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!"))

License

Copyright © 2014, Alan Dipert and Micha Niskin

Distributed under the Eclipse Public License, the same as Clojure