diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 7f1f05c16..d01ce2a45 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -155,8 +155,8 @@ class DatePicker extends Component { if (!this.iniOptions.locale) this.iniOptions.locale = this.$translate.use(); - if (!this.iniOptions.dateFormat && this.iniOptions.locale === 'es') - this.iniOptions.dateFormat = 'd-m-Y'; + if (!this.iniOptions.dateFormat) + this.iniOptions.dateFormat = this.iniOptions.locale === 'es' ? 'd-m-Y' : 'm-d-Y'; else if (this.iniOptions.dateFormat) { let format = this.iniOptions.dateFormat.split(/[ZT.,/ :-]/); if (format.length <= 1) { diff --git a/services/client/common/models/client-observation.js b/services/client/common/models/client-observation.js index cd1cba2a8..8b0e4a3ef 100644 --- a/services/client/common/models/client-observation.js +++ b/services/client/common/models/client-observation.js @@ -8,9 +8,9 @@ module.exports = function(Self) { ctx.instance.created = Date(); let token = ctx.options.accessToken; let userId = token && token.userId; - let app = require('../../server/server'); + let app = require('../../server/server'); let Employee = app.models.Employee; - Employee.findOne({where: {userFk: userId}}, function (err, user){ + Employee.findOne({where: {userFk: userId}}, (err, user) => { if (user) { ctx.instance.employeeFk = user.id; next();