      (om/build pages-list (:pages document)
                {:state state})]))
 
-(ui/defcomponent ^:private meta-pane [document owner]
+(ui/defcomponent ^:private date-picker [{:keys [document_date]} owner]
+  (render-state [_ {:keys [date value]}]
+    [:input {:type "date"
+             :value value
+             :on-change (fn [e] (do
+                                  (om/set-state! owner :value e.target.value)
+                                  (async/put! date e.target.value)))}]))
+
+(ui/defcomponent ^:private meta-pane [{:keys [document_date] :as document} owner]
   (render [_]
     [:.sidebar
      [:header "Meta"]

  (init-state [_]
    {:page-number 1
     :pages (async/chan)
     :tag-changes (async/chan)})
  (will-mount [_]
    ;; Start handling tag change events etc.
    (go-loop []
      (let [{:keys [pages tag-changes]} (om/get-state owner)
            [event port] (alts! [pages tag-changes])]
        (when (and event port)
          (condp = port
            pages

         [:.pane {:style {:min-width width :max-width width}
                  :key "meta-pane"}
          (om/build meta-pane document
                    {:init-state {:tags tag-changes
                                  :date date-changes}})])])))

(defmethod draggable/pos->width ::thumbnails [sidebars sidebar [x _]]
  (draggable/limit
