Date Format

rss

Posted by schuess - Jan 28 ’14 at 03:27

The origin of this question may be more geared toward SharePoint in General but thought I would ask if you have a way to do it with FD.

Dates Fields come out like the following:  1/1/1999 . Is there a way to Change them to display like 01/01/1999

(forcing it to render  2 digit months, and 2 digit dates)

Thanks

-schuess

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 8 days
    #1 by Dmitry Kozlov Jan 29 ’14 at 04:06

    Hello,

    Please, try to change your locale to English (Unitied Kingdom). Go to Site Settings of your root site, choose Regional settings under Site Administration section and set Locale to English (Unitied Kingdom).

  • schuess
    schuess
    Member
    Member for: 6 years 8 months 5 days
    #2 by schuess Feb 18 ’14 at 04:10

    Since FD uses jQueryUI, is it possible to use the following documentation to format my dates so that they come out with leading zeros like seen below?

    Here’s a few jQuery’ised DateTime Format functions – AWESOME !

    $.datepicker.formatDate([FORMAT], new Date());

    dd/mm/yy

    01/09/2012

    http://api.jqueryui.com/datepicker/#option-dateFormat

    dateFormatType: String

    Default: "mm/dd/yy"

    The format for parsed and displayed dates. For a full list of the possible formats see the formatDate function.

    Code examples:

    Initialize the datepicker with the dateFormat option specified:

    1

    $( ".selector" ).datepicker({ dateFormat: "yy-mm-dd" });

    Get or set the dateFormat option, after initialization:

    1

    2

    3

    4

    5

    // getter

    var dateFormat = $( ".selector" ).datepicker( "option", "dateFormat" );

    // setter

    $( ".selector" ).datepicker( "option", "dateFormat", "yy-mm-dd" );

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 8 days
    #3 by Dmitry Kozlov Feb 19 ’14 at 07:08

    [#2]: Hi Matt,

    You cannot change date and time format of the standard SharePoint controls, otherwise they will be broken. But you can try to hide the standard fields and display your own date picker instead of the standard ones. When user submits form, you can copy values to real SharePoint controls via JavaScript.

Displaying 1 to 3 of 3 messages