JS: StringFormat or converter in Binding? RRS feed

  • Question

  • Hey,

    I'm using databinding, and in my template I am binding to a Date field:

    <div class="itemtemplate" data-win-control="WinJS.Binding.Template">

    <h6 data-win-bind="textContent: createdDate"></h6>


    what I see on the screen is: "Thu May 10 20:51:32 UTC+0300 2012", which is the default "toString" for Date in JS. I want it to show "2012-05-10". How do I do that?

    Can u supply a Converter? a StringFormat? (Sorry for my XAML jargon, I'm a WPF guy :) )

    http://blogs.microsoft.co.il/blogs/eladkatz @ElatKt

    Thursday, May 10, 2012 5:52 PM


All replies