List of Customers
@@ -54,9 +54,9 @@
-
+
-
+
@@ -134,6 +134,33 @@ export default {
mounted() {
this.customerService.getCustomers().then(data => this.customers = data);
},
+ methods: {
+ filterDate(value, filter) {
+ if (filter === undefined || filter === null || (typeof filter === 'string' && filter.trim() === '')) {
+ return true;
+ }
+
+ if (value === undefined || value === null) {
+ return false;
+ }
+
+ return value === this.formatDate(filter);
+ },
+ formatDate(date) {
+ let month = date.getMonth() + 1;
+ let day = date.getDate();
+
+ if (month < 10) {
+ month = '0' + month;
+ }
+
+ if (day < 10) {
+ day = '0' + day;
+ }
+
+ return date.getFullYear() + '-' + month + '-' + day;
+ }
+ },
components: {
'DataTableDoc': DataTableDoc,
'DataTableSubMenu': DataTableSubMenu