nl-NL date format displayed wrong

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    nl-NL date format displayed wrong

    Ext.NET 2.4.0 through NuGet
    ASP.NET 4.5.1
    Windows 8.1 Pro

    In the web.config I set globalization as followed:
    <globalization enableClientBasedCulture="false" culture="nl-NL" uiCulture="nl-NL"  />
    In the the application it is displaying all text in Dutch and numbers in Dutch format only the date format is displayed wrong.
    It is displaying:
    10/16/2014

    When I look at the extjs sources it should be:
    16-10-2014 'j-m-Y'
    Last edited by Daniil; Oct 16, 2014 at 1:02 PM. Reason: Please use [CODE] tags
  2. #2
    Hi @mturnhout,

    Is the localization JavaScript file attached to the page? There should be something like this:
    <script type="text/javascript" src="/extnet/locale/ext-lang-nl-js/ext.axd?v=16596"></script>
    When I look at the extjs sources it should be:
    16-10-2014 'j-m-Y'
    Please clarify where exactly do you see that?
  3. #3
    It's being attached:
    <script type="text/javascript" src="/extnet/locale/ext-lang-nl-js/ext.axd?v=10712"></script>
    Containing the following:
    Ext.define("Ext.locale.nl.form.field.Date", {
        override: "Ext.form.field.Date",
        disabledDaysText: 'Uitgeschakeld',
        disabledDatesText: 'Uitgeschakeld',
        minText: 'De datum in dit veld moet na {0} liggen',
        maxText: 'De datum in dit veld moet voor {0} liggen',
        invalidText: '{0} is geen geldige datum - formaat voor datum is {1}',
        format: 'j-m-y',
        altFormats: 'd/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d'
    });
    Last edited by mturnhout; Oct 16, 2014 at 1:21 PM.
  4. #4
    The DateField's Format appears to be applied in the following test case. I choose today and it appears as "15-10-2014".

    Example
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" Locale="nl" />
    
            <ext:DateField runat="server" />
        </form>
    </body>
    </html>
    only the date format is displayed wrong
    Please clarify where exactly? I guess a DateColumn? Because I don't see an override for a DateColumn's format in the "nl" locale.
  5. #5
    Yes, sorry for not specifying this.

    Seems this is indeed the problem.
    The Dutch localization file hasn't been updated since '8 Aug 2008'.
    And is missing the override for BooleanColumn, NumberColumn, DateColumn and some other translations.

    NumberColumn same as German:
    Ext.define("Ext.locale.nl.grid.NumberColumn", {
        override: "Ext.grid.NumberColumn",
        format: '0.000,00/i'
    });
    DateColumn same format as DateField:
    Ext.define("Ext.locale.nl.grid.DateColumn", {
        override: "Ext.grid.DateColumn",
        format: 'j-m-y'
    });
    Not sure if it's usefull to translate the BooleanColumn but see the German one is:
    Ext.define("Ext.locale.nl.grid.BooleanColumn", {
        override: "Ext.grid.BooleanColumn",
        trueText: "waar",
        falseText: "vals"
    });
    What is the best/fastest way to get a proper update of the Dutch localization file in ExtJs -> Ext.Net -> Application?
    And also perhaps have a 'nl-BE' one added for customers in Belgium.

    Thanks for the help!
    Last edited by mturnhout; Oct 20, 2014 at 11:58 AM.
  6. #6
    I might correct the Dutch locale in SVN. As for Belgium one, it is unlikely we will incorporate it at this point, because there is no a good and clear mechanism to do that yet.

    In any way, it is just JavaScript. You can always attach any JavaScript code on the page manually.

Similar Threads

  1. Replies: 8
    Last Post: May 20, 2013, 4:01 AM
  2. Replies: 1
    Last Post: Apr 13, 2012, 1:52 PM
  3. [CLOSED] Wrong Date Format on the store
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 25, 2011, 9:56 PM
  4. DatePicker: get Min Date and Max Date just displayed
    By Journeyman79 in forum 1.x Help
    Replies: 0
    Last Post: Mar 16, 2011, 10:41 AM
  5. [CLOSED] GridView wrong number of records displayed
    By alexp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 15, 2009, 11:03 AM

Tags for this Thread

Posting Permissions