@farm-investimentos/front-mfe-components 9.1.0 → 9.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -136,7 +136,9 @@ export default Vue.extend({
136
136
  timeZone: 'America/Sao_Paulo',
137
137
  });
138
138
 
139
- return this.min && locatedSelectedDate < locatedMinDate
139
+ console.log(this.getUniversalDate(locatedSelectedDate), this.getUniversalDate(locatedMinDate));
140
+
141
+ return this.min && this.getUniversalDate(locatedSelectedDate) < this.getUniversalDate(locatedMinDate)
140
142
  ? 'A data está fora do período permitido'
141
143
  : true;
142
144
  },
@@ -174,6 +176,11 @@ export default Vue.extend({
174
176
  this.save();
175
177
  }
176
178
  },
179
+ getUniversalDate(d) {
180
+ const onlyDMY = d.split(' ')[0];
181
+ const arr = onlyDMY.split('/');
182
+ return new Date(arr[2], arr[1] -1, arr[0]);
183
+ },
177
184
  },
178
185
  computed: {
179
186
  inputVal: {