We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d2a225 commit a9ea108Copy full SHA for a9ea108
1 file changed
generator/templates/Default/src/components/crud/fields/KDateField.vue
@@ -78,10 +78,8 @@ export default {
78
},
79
80
created() {
81
- if (this.type === 'month') {
82
- return this.date = this.value || dayjs().format('MMM YYYY');
83
- }
84
- this.date = this.value || dayjs().format('YYYY-MM-DD');
+ const format = this.type === 'month' ? 'MMM YYYY' : 'YYYY-MM-DD';
+ this.date = this.value || dayjs().format(format);
85
86
computed: {
87
formattedDate() {
0 commit comments