Skip to content

Instantly share code, notes, and snippets.

@muffik
Created April 16, 2019 08:20
Show Gist options
  • Save muffik/6453d06a63f687b1e1c574d3d6fe348f to your computer and use it in GitHub Desktop.
Save muffik/6453d06a63f687b1e1c574d3d6fe348f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<filter-config name="LbEdfCorrectedDocumentDateList" operations="LIKE" filter-type="DATE">
<converter>
debugger;
var format = {
selector:"date",
datePattern:"dd.MM.yyyy"
};
if (toQuery) {
if (!value) {
return "";
}
var date = new Date(value);
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
return dojo.date.locale.format(date, format);
} else {
if (!value) {
return null;
}
var date = (value instanceof Date)
? value
: dojo.date.locale.parse(value, format);
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
return date;
}
</converter>
</filter-config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment