Date Format

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

28 Jan 2014

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

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

29 Jan 2014

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).

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

18 Feb 2014

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" );

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

19 Feb 2014

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.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests