summaryrefslogtreecommitdiffstats
path: root/js/gradings.js
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-02-11 19:57:44 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-02-11 19:57:44 +0100
commitd7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0 (patch)
treeec26ae4f98501629c58cac1c213720fd22c08f2d /js/gradings.js
parentforce redirect to secure connection (diff)
downloadbeziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.tar
beziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.tar.gz
beziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.tar.bz2
beziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.tar.lz
beziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.tar.xz
beziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.tar.zst
beziapp-d7f6e4e5fdbf9c9f9128c6ca68ee77b47f4313a0.zip
Diffstat (limited to '')
-rw-r--r--js/gradings.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/js/gradings.js b/js/gradings.js
index 39be331..a6024f6 100644
--- a/js/gradings.js
+++ b/js/gradings.js
@@ -177,6 +177,25 @@ function gradingClickHandler(eventClickInfo) {
M.Sidenav.getInstance(modal).open();
}
+function setupPickers() {
+ // Setup pickers
+ var date_object = new Date();
+
+ let elems = document.querySelectorAll('#datepicker-add');
+ let options = {
+ autoClose: true,
+ format: "dd.mm.yyyy",
+ defaultDate: date_object,
+ setDefaultDate: true,
+ firstDay: 1
+ }
+ let instances = M.Datepicker.init(elems, options);
+
+
+ instances = M.Datepicker.init(elems, options);
+}
+
+
document.addEventListener("DOMContentLoaded", () => {
checkLogin();
@@ -192,7 +211,7 @@ document.addEventListener("DOMContentLoaded", () => {
height: "parent"
});
calendar_obj.render();
-
+ setupPickers();
loadGradings();
// Setup refresh handler