From 027de3694fe36ba6fc14fc2cae0f20f942705af5 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 1 Mar 2019 20:09:52 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 1 + ayanova/src/main.js | 47 +++++++++++++++++++++ ayanova/src/views/inventory-widget-edit.vue | 12 ++++-- 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 951ecd28..39b3f949 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -16,6 +16,7 @@ TODO CLIENT STUFF DATETIME - Ok, fuck a combined date and time, no one else seems to support it but me so split it into separate components: - How to work with getting and setting a value from a component? Because datepicker expects a string of only date and barfs otherwise but I have a combined field that needs to be set as well + -https://codepen.io/anon/pen/dQJOyQ?editors=1010 ?? - Get the test form working with a custom date and time thing like this: - single read only text field with initial display of date and time in users's locale format - A button to the left with a calendar icon to trigger a date picker to adjust the date diff --git a/ayanova/src/main.js b/ayanova/src/main.js index e03cd80e..d41e0e8a 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -11,6 +11,7 @@ import errorHandler from "./api/errorhandler"; import NProgress from "nprogress"; import "nprogress/nprogress.css"; import dayjs from "dayjs"; +import gzdatepicker from "./components/gzdatepicker.vue"; ///////////////////////////////////////////////////////////////// // FORM VALIDATION @@ -101,6 +102,52 @@ Vue.filter("boolastext", function(value) { return value ? "Yes" : "Nope"; }); +//COMPONENT DATE TEST +// + +Vue.component("gz-date-picker", gzdatepicker); + +// Vue.component("GzDatePicker", { +// props: { +// value: Date +// }, +// render() { +// return this.$createElement("v-date-picker", { +// props: { +// ...this.$attrs, +// value: this.value ? this.value.toISOString().substr(0, 10) : null +// }, +// on: { +// ...this.$listeners, +// input: date => this.$emit("input", new Date(date)) +// } +// }); +// } +// }); + +// Vue.component("AltGzDatePicker", { +// props: { +// value: String +// }, +// data: function() { +// return { +// ogdate: "" +// }; +// }, +// render() { +// return this.$createElement("v-date-picker", { +// props: { +// ...this.$attrs, +// value: this.value ? this.value.substr(0, 10) : null +// }, +// on: { +// ...this.$listeners, +// input: date => this.$emit("input", new Date(date).toISOString()) +// } +// }); +// } +// }); + ///////////////////////////////////////////////////////////////// // INSTANTIATE // diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index 453b3249..e2f931d4 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -50,7 +50,7 @@ - +