Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

DetailViewer Date Format

$
0
0
SmartClient Version: v8.3p_2013-03-20/PowerEdition Deployment (built 2013-03-20)

I have a requirement to display DetailViewer fields using a date format of "dd-MMM-yy".

I attempted to apply the date format globally within the application with the following logic in the onModuleLoad() method.

Code:

DateUtil.setNormalDateDisplayFormatter(new DateDisplayFormatter()
        {
            public String format(Date aDate)
            {
                if (aDate == null)
                    return null;
                else
                    return DateTimeFormat.getFormat("dd-MMM-yy").format(aDate);
            }
        });

Unfortunately, the DetailViewer did not honor the format. See attached for further details.

What is the proper way to set the date format for a data source field in the DetailViewer?

Thanks.

Attached Images
File Type: png Details.png (8.6 KB)
Attached Files
File Type: xml coreDetail.ds.xml (1.2 KB)

Viewing all articles
Browse latest Browse all 4756