KendoUi format broken after require.js optimize

3 posts, 1 answers
  1. Sascha
    Sascha avatar
    2 posts
    Member since:
    Jul 2014

    Posted 09 Jul 2014 Link to this post

    Hi all,

    I have a Backbone application with multiple KendoUi [v2013.2.918; kendo.all.min.js] components e.g. Grid, NumericTextBox. To display this value "12,5 h" in a numericTextBox, I use this:

      format: '#.0 h'

    For the development Version, not optimized with r.js (requie.js), everything works as expected. For the production Version, after the r.js optimizer, this format breaks the app:

    Uncaught TypeError: Cannot read property 'numberFormat' of null

    The predefined formats like "c2" or "p" works without a problem. Could it be a problem with the kendo.culture('de-DE') I use? I had similar problems with the library globalize.js, which overrides the kendo.culture. Is there a known dependency to another library who could break the optimized-code? There is a 2nd library with dependencies to globalize.js:

    shim: {
        someLib: {
            deps: ['globalize']

    There is a forum entry on the kendo site, with a similar problem. The solution should be to load the kendo library before the globalize library. If I take a look to the script-tags on the index.html, kendo comes before globalize. So, this is not a solution that works for me.

    For more information, please let me know.


  2. Answer
    Georgi Krustev
    Georgi Krustev avatar
    3689 posts

    Posted 11 Jul 2014 Link to this post

    Hello Sascha,

    Based on the given error message, I would conclude that a newer version of Globalize.js is used (2.x version), where the API signature has changed drastically. Because of this change we decided to cease our support for Globalize.js 2.x or higher. You can find a related discussion here. The feasible solution for now is to load the Globalize script after kendo.all.js.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Sascha
    Sascha avatar
    2 posts
    Member since:
    Jul 2014

    Posted 11 Jul 2014 in reply to Georgi Krustev Link to this post

    Hey Georgi,

    the newer version of globalize.js did it. By the way, the latest version of globalize.js is 1.0.0-alpha.3.
    Unhappily, the "someLib" doesn't works with the newer version of globalize.js, but this is another problem :-)

    Best regards,


Back to Top