Date converter in a RadListView


Following this example:

I was able to get this to work:

  var observableModule   = require("data/observable");
  var moment                   =  require("moment");
  var pageData                = new observableModule.Observable();
  var page;

  exports.onPageLoaded = function(args) {
      page = args.object;
      var  formatDateTime = {
         toView: function(value) {
            console.log(`value: ${value}`);
            return moment(value).format('YYYY-MM-DD hh:mm');
     page.bindingContext = pageData;


<!-- this works fine -->
<Label text="{{ sampleDate, sampleDate | SampleDate}}" />

Now when I try to apply the same to a radlistview it does not work:

 <lv:RadListView items="{{ }}" id="receipt" row="3" col="0"> 

                    <lv:ListViewLinearLayout scrollDirection="Vertical" />
                    <GridLayout columns="auto,auto,auto" rows="auto,auto,auto,auto,auto" >
                         <!--does not work-->
                        <Label text="{{ arrivalDate, arrivalDate |  formatDateTime }}" row="3" col="1"  />
                        <!-- this work --> 
                        <Label text="{{ arrivalDate }}" row="3" col="2" /> 


Can someone point me in the right direction?


I actually faced similar issue here Problems using data converter with RadAutoCompleteTextView where my data converter works everywhere except with RadAutoComplete


I think you have to the parent’s binding context.