Skip to content

Commit 4bc0601

Browse files
author
Lionel Bijaoui
committed
fix linting
1 parent bce9070 commit 4bc0601

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/fields/fieldInput.vue

+15-14
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,34 @@
3434
</template>
3535

3636
<script>
37+
/* global moment */
3738
import abstractField from "./abstractField";
3839
3940
export default {
4041
mixins: [ abstractField ],
4142
methods: {
4243
formatValueToField(value) {
4344
switch(this.schema.inputType){
44-
case "date":
45-
return moment(value).format("YYYY-MM-DD");
46-
case "datetime":
47-
return moment(value).format();
48-
case "datetime-local":
49-
return moment(value).format("YYYY-MM-DDTHH:mm:ss");
50-
default:
51-
return value;
45+
case "date":
46+
return moment(value).format("YYYY-MM-DD");
47+
case "datetime":
48+
return moment(value).format();
49+
case "datetime-local":
50+
return moment(value).format("YYYY-MM-DDTHH:mm:ss");
51+
default:
52+
return value;
5253
}
5354
},
5455
formatValueToModel(value) {
5556
console.log(this.schema.inputType, typeof value);
5657
if (value != null) {
57-
if (this.schema.inputType === "date" ||
58-
this.schema.inputType === "datetime" ||
59-
this.schema.inputType === "datetimelocal") {
58+
if (this.schema.inputType === "date" ||
59+
this.schema.inputType === "datetime" ||
60+
this.schema.inputType === "datetimelocal") {
6061
return new Date(value).getTime();
61-
}else{
62-
return value;
63-
}
62+
}else{
63+
return value;
64+
}
6465
} else {
6566
return value;
6667
}

0 commit comments

Comments
 (0)