SearchBuilder - Filter datetime and Translations
SearchBuilder - Filter datetime and Translations
WNRCAM
Posts: 6Questions: 1Answers: 0
in Extensions
Link to test case:
Debugger code (debug.datatables.net): https://debug.datatables.net/ucicit
Error messages shown:
Description of problem:
1 - I cannot translate the conditionName, I tried some exemples but nothing works.
2 - I need DataTimePicker on datetime fields search.
columns = [ ...
{title: '{% trans "Deadline" %}', type:"date", data: "dtt_deadline" , searchable: true},
.....
]
language: {
decimal: ",",
...
searchBuilder: {
button: '<i class="large grey-text material-icons">search</i>',
add: '{% trans "New rule" %}',
clearAll: '{% trans "Clear Filters" %}',
condition: '{% trans "Condition" %}',
data: '{% trans "Column" %}',
deleteTitle: '{% trans "Delete" %}',
leftTitle: '{% trans "Outdent criteria" %}',
logicAnd: '{% trans "AND" %}',
logicOr: '{% trans "OR" %}',
rightTitle: '{% trans "Indent criteria" %}',
title: {
0: '{% trans "Custom Filter" %}',
_: '{% trans "Custom Filter" %}' + ' (%d)'
},
conditions: {
date: {
contains: '{% trans "Contains" %}',
empty: '{% trans "Empty" %}',
endsWith: '{% trans "Ends With" %}',
equals: '{% trans "Equals" %}',
not: '{% trans "Not" %}',
notEmpty: '{% trans "Not Empty" %}',
startsWith: '{% trans "Starts With" %}',
},
moment: {
contains: '{% trans "Contains" %}',
empty: '{% trans "Empty" %}',
endsWith: '{% trans "Ends With" %}',
equals: '{% trans "Equals" %}',
not: '{% trans "Not" %}',
notEmpty: '{% trans "Not Empty" %}',
startsWith: '{% trans "Starts With" %}',
},
num: {
between: '{% trans "Between" %}',
empty: '{% trans "Empty" %}',
equals: '{% trans "Equals" %}',
gt: '{% trans "Greater Than" %}',
gte: '{% trans "Greater Than Equal To" %}',
lt: '{% trans "Less Than" %}',
lte: '{% trans "Less Than Equal To" %}',
not: '{% trans "Not" %}',
notBetween: '{% trans "Not Between" %}',
notEmpty: '{% trans "Not Empty" %}',
},
string: {
contains: '{% trans "Contains" %}',
empty: '{% trans "Empty" %}',
endsWith: '{% trans "Ends With" %}',
equals: '{% trans "Equals" %}',
not: '{% trans "Not" %}',
notEmpty: '{% trans "Not Empty" %}',
startsWith: '{% trans "Starts With" %}',
}
}
}
},
...
buttons: [
{
extend: 'searchBuilder',
config: {
depthLimit: 4,
columns: searchBuilderIds
},
attr: {
'class': 'right btn waves-effect white lighten-1 tooltipped',
'data-position':'top',
'data-tooltip': "{% trans 'Custom search' %}",
},
},
],
Json
...
process_created "29/10/2020 10:03"
dtt_deadline "30/10/2020 10:03" // Encerramento field here...
This discussion has been closed.
Answers
Hi @WNRCAM ,
Your language setup looks correct. In order to help with both of the above we will need to see a test case. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Thanks,
Sandy
I can send you a link to my development environment but I don't want to let it public, give me your email account, please.
The code I will not be able to give access.