This commit is contained in:
@@ -15,6 +15,7 @@ TODO CLIENT STUFF
|
||||
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:
|
||||
- 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
|
||||
- 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
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
required
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<v-text-field
|
||||
v-model="obj.dollarAmount"
|
||||
@@ -49,6 +50,10 @@
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<v-date-picker :label="pickStartDate" v-model="pickStartDate"></v-date-picker>
|
||||
</v-flex>
|
||||
|
||||
<!-- <v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<v-menu
|
||||
v-model="menu2"
|
||||
:close-on-content-click="false"
|
||||
@@ -61,13 +66,13 @@
|
||||
>
|
||||
<v-text-field
|
||||
slot="activator"
|
||||
:value="obj.startDate"
|
||||
:value="dateFormatted"
|
||||
:label="lc.get('WidgetStartDate')"
|
||||
readonly
|
||||
></v-text-field>
|
||||
<v-date-picker v-model="obj.startDate" @input="menu2 = false"></v-date-picker>
|
||||
<v-date-picker v-model="pickStartDate" @input="menu2 = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
</v-flex>-->
|
||||
<!--
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<v-text-field slot="activator" v-model="obj.startDate" label="MyPicker" readonly></v-text-field>
|
||||
@@ -125,6 +130,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
obj: {
|
||||
startDate: "2000-01-12T10:12:39.594206"
|
||||
// id: 1,
|
||||
// concurrencyToken: 1,
|
||||
// ownerId: 1,
|
||||
@@ -140,21 +146,32 @@ export default {
|
||||
// customFields: null,
|
||||
// tags: []
|
||||
},
|
||||
obj2: {
|
||||
startDate: "2000-02-12"
|
||||
},
|
||||
startDate: "2000-03-12",
|
||||
lc: locale,
|
||||
menu2: false,
|
||||
date: new Date().toISOString().substr(0, 10)
|
||||
|
||||
testDate: new Date().toISOString().substr(0, 10)
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
computedDateFormattedMomentjs() {
|
||||
dateFormatted() {
|
||||
// var value = this.obj.startDate;
|
||||
// if (!value) return "";
|
||||
// var dj = dayjs(value);
|
||||
// return dj.format("YYYY-MM-DD hh:mm:ss A");
|
||||
|
||||
|
||||
var value=this.obj.startDate;
|
||||
if (!value) return "";
|
||||
var dj = dayjs(value);
|
||||
return dj.format("YYYY-MM-DD hh:mm:ss A");
|
||||
return this.obj.startDate
|
||||
? dayjs(this.obj.startDate).format("YYYY-MM-DD hh:mm:ss A")
|
||||
: "";
|
||||
|
||||
return this.date ? moment(this.date).format("dddd, MMMM Do YYYY") : "";
|
||||
//return this.obj.startDate ? moment(this.date).format("dddd, MMMM Do YYYY") : "";
|
||||
},
|
||||
pickStartDate() {
|
||||
var copiedDate = new Date(date.getTime());
|
||||
obj.startDate.toISOString().substr(0, 10);
|
||||
}
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
|
||||
Reference in New Issue
Block a user