fix the problem that the day of week in date time / date range picker is wrong
This commit is contained in:
@@ -91,7 +91,7 @@ export default {
|
|||||||
return this.$store.getters.currentUserFirstDayOfWeek;
|
return this.$store.getters.currentUserFirstDayOfWeek;
|
||||||
},
|
},
|
||||||
dayNames() {
|
dayNames() {
|
||||||
return this.$locale.getAllMinWeekdayNames();
|
return this.$utilities.arrangeArrayWithNewStartIndex(this.$locale.getAllMinWeekdayNames(), this.firstDayOfWeek);
|
||||||
},
|
},
|
||||||
is24Hour() {
|
is24Hour() {
|
||||||
const datetimeFormat = this.$t('format.datetime.long');
|
const datetimeFormat = this.$t('format.datetime.long');
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default {
|
|||||||
return this.$store.getters.currentUserFirstDayOfWeek;
|
return this.$store.getters.currentUserFirstDayOfWeek;
|
||||||
},
|
},
|
||||||
dayNames() {
|
dayNames() {
|
||||||
return this.$locale.getAllMinWeekdayNames();
|
return this.$utilities.arrangeArrayWithNewStartIndex(this.$locale.getAllMinWeekdayNames(), this.firstDayOfWeek);
|
||||||
},
|
},
|
||||||
is24Hour() {
|
is24Hour() {
|
||||||
const datetimeFormat = this.$t('format.datetime.long');
|
const datetimeFormat = this.$t('format.datetime.long');
|
||||||
|
|||||||
@@ -462,6 +462,24 @@ function copyArrayTo(fromArray, toArray) {
|
|||||||
return toArray;
|
return toArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function arrangeArrayWithNewStartIndex(array, startIndex) {
|
||||||
|
if (startIndex <= 0 || startIndex >= array.length) {
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newArray = [];
|
||||||
|
|
||||||
|
for (let i = startIndex; i < array.length; i++) {
|
||||||
|
newArray.push(array[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < startIndex; i++) {
|
||||||
|
newArray.push(array[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return newArray;
|
||||||
|
}
|
||||||
|
|
||||||
function appendThousandsSeparator(value) {
|
function appendThousandsSeparator(value) {
|
||||||
if (!settings.isEnableThousandsSeparator() || value.length <= 3) {
|
if (!settings.isEnableThousandsSeparator() || value.length <= 3) {
|
||||||
return value;
|
return value;
|
||||||
@@ -927,6 +945,7 @@ export default {
|
|||||||
isDateRangeMatchFullMonths,
|
isDateRangeMatchFullMonths,
|
||||||
copyObjectTo,
|
copyObjectTo,
|
||||||
copyArrayTo,
|
copyArrayTo,
|
||||||
|
arrangeArrayWithNewStartIndex,
|
||||||
appendThousandsSeparator,
|
appendThousandsSeparator,
|
||||||
numericCurrencyToString,
|
numericCurrencyToString,
|
||||||
stringCurrencyToNumeric,
|
stringCurrencyToNumeric,
|
||||||
|
|||||||
Reference in New Issue
Block a user