[fusion-trac] #663: SelectionPanel: Allow date/time display formatting to be customizable.

Fusion trac_fusion at osgeo.org
Wed Aug 29 06:45:23 PDT 2018


#663: SelectionPanel: Allow date/time display formatting to be customizable.
---------------------------+---------------------------
   Reporter:  jng          |             Owner:  jng
       Type:  enhancement  |            Status:  closed
   Priority:  P2           |         Milestone:  Future
  Component:  Widgets      |           Version:  2.0
   Severity:  Major        |        Resolution:  fixed
   Keywords:               |           Browser:  All
External ID:               |  Operating System:  All
      state:  New          |
---------------------------+---------------------------
Changes (by jng):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"3045" 3045]:
 {{{
 #!CommitTicketReference repository="" revision="3045"
 Add support for specifying a custom date/time formatter function in the
 SelectionPanel widget. An example usage (format as d/m/y) would involve
 inserting something like this in the FUSION_INITIALIZED handler function.

 Fusion.Widget.SelectionPanel.setDateTimeFormatter(function(dateStr) {
     if (dateStr) {
         var tokens = dateStr.split(" ");
         if (tokens.length == 2) {
             var dtParts = tokens[0].split("-");
             var y = dtParts[0];
             var m = dtParts[1];
             var d = dtParts[2];
             return d + "/" + m + "/" + y;
         }
     }
     return "";
 });

 Fixes #663
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/663#comment:1>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list