[CLOSED] DateField not working when using custom format

  1. #1

    [CLOSED] DateField not working when using custom format

    When I use a DateField and specify a custom format for it, the SelectedDate property is always equal to MinDate

    <ext:DateField runat="server" ID="dtStartDate" FieldLabel="#Start Date#" Format="d/m/Y" />
    dtStartDate.SelectedDate == {1/1/0001 12:00:00 AM}

    same thing happens to the Value property, so basically the associated DateTime object is messed up.
  2. #2

    RE: [CLOSED] DateField not working when using custom format

    Hi,

    You need use .NET format specifiers
    http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx


    So, please use
    Format="dd/MM/yyyy" 


    Also can be useful use \/ instead / if you don't want to change date delimiter by current culture
    Format="dd\/MM\/yyyy"

  3. #3

    RE: [CLOSED] DateField not working when using custom format

    that did it, thanks.
    I thought I should use javascript format

Similar Threads

  1. [CLOSED] DateField Format
    By rnfigueira in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 18, 2011, 12:39 PM
  2. [1.0] DateField.Format not working
    By nextSTEP in forum 1.x Help
    Replies: 4
    Last Post: Nov 18, 2010, 10:18 AM
  3. [CLOSED] DateField and Format
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 07, 2009, 6:21 PM
  4. [CLOSED] DateField format
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 20, 2009, 9:47 AM
  5. [CLOSED] 0.4.6 : DateField format as dd/mm/yyy
    By stevejebson in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 13, 2008, 3:14 PM

Posting Permissions