This commit is contained in:
@@ -15,15 +15,17 @@ TODO CLIENT STUFF
|
|||||||
TODO NEXT
|
TODO NEXT
|
||||||
|
|
||||||
DATETIME - Ok, fuck a combined date and time, no one else seems to support it but me so split it into separate components:
|
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:
|
- Wrap the date picker to work with our dates without losing time.
|
||||||
- single read only text field with initial display of date and time in users's locale format
|
- Wrap a time picker to work with our dates without losing the date.
|
||||||
- A button to the left with a calendar icon to trigger a date picker to adjust the date
|
- Once this is done then combine them into a single component that:
|
||||||
- A button to the right with a clock icon to trigger a time picker to set the time
|
-wraps both pickers as buttons to trigger selection on either side of a text that displays read only the locale formatted dt
|
||||||
- Once this is working how I like then make it a VUE component that is self contained
|
- single read only text field with initial display of date and time in users's locale format
|
||||||
- Date and time formatting and display need to be abstracted in case we change date libs from dayjs to something else
|
- A button to the left with a calendar icon to trigger a date picker to adjust the date
|
||||||
- Must validate and report validation errors just like the built in fields do
|
- A button to the right with a clock icon to trigger a time picker to set the time
|
||||||
|
- Must validate and report validation errors just like the built in fields do
|
||||||
|
- Test on mobile and desktop and then if all is well we can move on to the other field types
|
||||||
|
|
||||||
|
|
||||||
DON'T code the user options with the currency symbol etc until after it's all been worked out client side. Use static values instad in locale.
|
DON'T code the user options with the currency symbol etc until after it's all been worked out client side. Use static values instad in locale.
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
|
//////////////////////////////////////////
|
||||||
|
// GZDatePicker
|
||||||
|
// This component was created to wrap the
|
||||||
|
// vuetify date picker to allow using string date
|
||||||
|
// and time in iso format and not lose the time
|
||||||
|
// portion when picking a new date
|
||||||
|
//
|
||||||
/* Xeslint-disable */
|
/* Xeslint-disable */
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -21,6 +28,8 @@ export default {
|
|||||||
//Put back the time portion from before
|
//Put back the time portion from before
|
||||||
var combined = date + that.value.substr(10);
|
var combined = date + that.value.substr(10);
|
||||||
that.$emit("input", new Date(combined).toISOString());
|
that.$emit("input", new Date(combined).toISOString());
|
||||||
|
//Note: I have observed that it converts a date with milliseconds to a date with the final 3 digits stripped and Z put in instead
|
||||||
|
//Not sure if this will be an issue or not but if it is then might need to force to not UTC or whatever
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user