Skip to content

Latest commit

 

History

History

blueprintjs-datetime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

cljsjs/blueprintjs-datetime

[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))}]])

Info:

Package includes @blueprintjs/datetime. You also need a css for styling from: https://unpkg.com/@blueprintjs/datetime@/lib/css/blueprint-datetime.css