Skip to content

Commit

Permalink
[Task]: Deprecate date editable format fallback (#355)
Browse files Browse the repository at this point in the history
* remove fallback

* Update date.js

* Update date.js
  • Loading branch information
kingjia90 committed Nov 22, 2023
1 parent bf05f0b commit a8b9492
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/js/pimcore/document/editables/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ pimcore.document.editables.date = Class.create(pimcore.document.editable, {

render: function () {
this.setupWrapper();

if (this.config.format && this.config.format.includes('%')) {
console.warn('Deprecated: Date format contains % symbols which is used for strftime, please the use parameters according Ext.Date formatting syntax instead.');

if (this.config.format) {
// replace any % prefixed parts from strftime format
this.config.format = this.config.format.replace(/%([a-zA-Z])/g, '$1');
}

if(this.data) {
this.config.value = this.data;
}
Expand Down

0 comments on commit a8b9492

Please sign in to comment.