Skip to content
Permalink
Browse files

Fix in filter for Date type

  • Loading branch information...
uprel committed Aug 12, 2019
1 parent 360159f commit 94b21b963f804a83a56502589d58d37ca9ec3ebd
Showing with 12 additions and 5 deletions.
  1. +12 −5 client/site/js/LayerActions.js
@@ -552,10 +552,13 @@ function getLayerAttributes(layer) {
fieldType='boolean';
}

if (fieldType.indexOf('Date')>-1) {
if (fieldType.indexOf('DateTime')>-1) {
fieldType = 'time';
} else if (fieldType.indexOf('Date')>-1) {
fieldType = 'date';
}


//if(fieldType=='int' || fieldType=='date' || fieldType=='boolean') {
// ret.fields.push({name: attribute.name,type:fieldType});
//}
@@ -604,14 +607,18 @@ function getLayerAttributes(layer) {

if(fieldType=='date') {
ret.columns[i].xtype = 'datecolumn';
ret.columns[i].format = 'Y-m-d H:i:s';
ret.columns[i].format = 'Y-m-d';
}

if(fieldType=='time') {
ret.columns[i].xtype = 'datecolumn';
ret.columns[i].format = 'Y-m-d H:i:s';
}

//if(fieldType=='boolean') {
// ret.columns[i].xtype = 'booleancolumn';
// //ret.columns[i].falseText = 'f';
// //ret.columns[i].trueText = 't';
// //ret.columns[i].xtype = 'booleancolumn';
// ret.columns[i].falseText = Ext.MessageBox.buttonText.no;
// ret.columns[i].trueText = Ext.MessageBox.buttonText.yes;
//}
}

0 comments on commit 94b21b9

Please sign in to comment.
You can’t perform that action at this time.