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

  • Comment author was deleted

    Nov 03, 2016 @ 09:06

    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

  • Comment author was deleted

    Nov 03, 2016 @ 09:12
  • Mike Chambers 636 posts 1253 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.

  • Comment author was deleted

    Feb 22, 2017 @ 16:21

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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies