Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Fix: Format Date DataTable (#1844)
Browse files Browse the repository at this point in the history
* Fix: Format Date DataTable

* Update FieldDate.vue

* minimal changes

---------

Co-authored-by: Edwin Betancourt <[email protected]>
  • Loading branch information
elsiosanchez and EdwinBetanc0urt authored Jan 13, 2024
1 parent 3487583 commit fa1ee08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/components/ADempiere/FieldDefinition/FieldDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,22 @@ export default {
let format = ''
if (!isEmptyValue(this.metadata.vFormat)) {
format = this.metadata.vFormat
.replace(/[Y]/gi, 'y')
.replace(/[m]/gi, 'M')
.replace(/[D]/gi, 'd')
}
if (isEmptyValue(format)) {
format = 'yyyy-MM-dd'
const { datePattern } = this.$store.getters['getCurrentLanguageDefinition']
if (!isEmptyValue(datePattern)) {
format = datePattern
}
}

if (this.typePicker.replace('range', '') === 'datetime') {
format = format + ' hh:mm:ss A'
}
return format
.replace(/[Y]/gi, 'y')
.replace(/[m]/gi, 'M')
.replace(/[D]/gi, 'd')
},
formatSend() {
if (this.formatView) {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const getters = {
return state.autoSave
},
getFullGridMode: (state) => {
return state.fullGridMocolNumde
return state.fullGridMode
},
getFixedHeader: (state) => {
return state.fixedHeader
Expand Down

0 comments on commit fa1ee08

Please sign in to comment.