This commit is contained in:
@@ -158,24 +158,7 @@ export default {
|
||||
"AM",
|
||||
"PM"
|
||||
],
|
||||
decimalValidate(required) {
|
||||
return { required: required, decimal: [2, this.format().decimalSeparator] };
|
||||
},
|
||||
decimalParse(v) {
|
||||
if (v) {
|
||||
if (
|
||||
this.decimalSeparator != "." &&
|
||||
v.includes(this.format().decimalSeparator)
|
||||
) {
|
||||
v = v.replace(this.format().decimalSeparator, ".");
|
||||
}
|
||||
v = parseFloat(v);
|
||||
}
|
||||
return v;
|
||||
},
|
||||
format() {
|
||||
return window.$gz.store.state.locale;
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// Take in a string that contains one or more
|
||||
//locale keys between square brackets
|
||||
@@ -224,6 +207,12 @@ export default {
|
||||
getCurrencyName() {
|
||||
return window.$gz.store.state.locale.currencyName;
|
||||
},
|
||||
//////////////////////////////////////////////////
|
||||
// Get the user's chosen 12hr clock
|
||||
//
|
||||
getHour12() {
|
||||
return window.$gz.store.state.locale.hour12;
|
||||
},
|
||||
///////////////////////////////////////////
|
||||
// Turn a utc date into a displayable
|
||||
// short date and time
|
||||
@@ -246,7 +235,7 @@ export default {
|
||||
}
|
||||
|
||||
if (!hour12) {
|
||||
hour12 = window.$gz.store.state.locale.hour12;
|
||||
hour12 = this.getHour12();
|
||||
}
|
||||
|
||||
//parse the date which is identified as utc ("2020-02-06T18:18:49.148011Z")
|
||||
@@ -306,7 +295,7 @@ export default {
|
||||
}
|
||||
|
||||
if (!hour12) {
|
||||
hour12 = window.$gz.store.state.locale.hour12;
|
||||
hour12 = this.getHour12();
|
||||
}
|
||||
|
||||
//parse the date which is identified as utc ("2020-02-06T18:18:49.148011Z")
|
||||
|
||||
Reference in New Issue
Block a user