Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yanick Van Barneveld 27 posts 148 karma points
    Nov 03, 2016 @ 09:01
    Yanick Van Barneveld
    0

    UIOMaticListViewField Configuration

    Hi,

    I am having a field in my listField that is a Datetime fuield, the code is looking as follow:

    [UIOMaticListViewField(Name = "Datum", Config = ""), UIOMaticField(Name = "Begintime", Description = "Enter the start date/time of the event", View = "datetime")]
    public DateTime Begintime { get; set; }
    

    Now it outputs something like this in the listView:

    2016-11-08T16:00:00Z
    

    How to make it possible so it outputs something like 8 October 2016? I know I have to do something with the Config variable but I can not find out what...

    Kind regards, Yanick

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Nov 03, 2016 @ 09:06
    Tim Geyssens
    100

    Hi Yanick , yes you can use any AngularJS filter to format the date

    http://www.nibble.be/?p=525

    So in your case you need the date filter

    https://docs.angularjs.org/api/ng/filter/date

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Nov 03, 2016 @ 09:12
  • Mike Chambers 602 posts 1149 karma points c-trib
    Feb 22, 2017 @ 16:19
    Mike Chambers
    0

    In case anyone else bumps up against this one...

      [UIOMaticField(Name = "Email Sent", Description = "Date the last time the email was sent", View="Label", Config = "{'format' : '{{value|date:\"medium\"}}'}")]
        [UIOMaticListViewField(Name = "Email Sent", Config = "{'format' : '{{value|relativeDate}}'}")]
        [Column("EmailSentDate")]
        public DateTime? EmailSentDate { get; set; }
    

    use of existing angular date formats is a qouted/string delimiter quagmire.. eventually found the right combination.

  • Tim Geyssens 6419 posts 15020 karma points MVP 2x c-trib
    Feb 22, 2017 @ 16:21
    Tim Geyssens
    0

    Yeah can be a bit tricky, thanks for sharing :)

Please Sign in or register to post replies

Write your reply to:

Draft