[cljsjs/blueprintjs-datetime "4.3.2-0"] ;; latest release
This jar comes with deps.cljs
as used by the Foreign Libs feature
of the ClojureScript compiler. After adding the above dependency to your project
you can require the packaged library like so:
;example usage for DateInput
(ns application.core
;You can use :refer, :as, or js-interops via js/BlueprintJSDatetime
(:require [blueprintjs-core]
[blueprintjs-datetime :refer [DateInput]]))
;date formatting options
(def options (clj->js {:year "numeric" :month "2-digit" :day "2-digit"}))
(defn view []
[:div "BlueprintJS minimal Datetime test"
[:> DateInput {:placeholder "dd.mm.yyyy"
;formatting of selected date
:formatDate (fn [d] (.toLocaleDateString d "de-DE" options))
;parse of actual input
:parseDate (fn [d] (js/Date. d))}]])
Package includes @blueprintjs/datetime. You also need a css for styling from: https://unpkg.com/@blueprintjs/datetime@/lib/css/blueprint-datetime.css