Kendo UI React NumericTextBox set culture

5 posts, 0 answers
  1. Vitali
    Vitali avatar
    3 posts
    Member since:
    Jun 2016

    Posted 09 Jan 2018 Link to this post

    How does one set the culture of the numerictextbox component (or global for the entire react app for instance)?

    I tried this:

    <NumericTextBox culture='nl-NL' decimals={2} format='c2' min={0} round={false} spinners={false}/>

    But this still shows the dollar sign and uses '.' as the decimal seperator instead of ','.

    No errors, but doesn't work.

     

  2. Stefan
    Admin
    Stefan avatar
    2895 posts

    Posted 11 Jan 2018 Link to this post

    Hello, Vitali,

    In order to change the culture, the corresponding culture file has to be loaded:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/numerictextbox#configuration-culture

    I made an example of the React wrapper and the culture was successfully changed to "de-DE":

    http://dojo.telerik.com/EtIVA

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Vitali
    Vitali avatar
    3 posts
    Member since:
    Jun 2016

    Posted 11 Jan 2018 in reply to Stefan Link to this post

    Thanks,

    but how does one do this, when using imports/webpack.

    When I add the extra script tag in the html file, it throws an error that kendo is not defined (which is 

    logical, as those scripts are not yet loaded, because the bundle is not yet loaded).

     

    Hope that makes sense ;-)

  4. Stefan
    Admin
    Stefan avatar
    2895 posts

    Posted 12 Jan 2018 Link to this post

    Hello, Vitali,

    In a scenario where a loaded such as Webpack is used the culture can be imported from the NPM package:

    import '@progress/kendo-ui/js/cultures/kendo.culture.de-DE.js';

    Once I imported the package, the widget culture was changed as expected.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Vitali
    Vitali avatar
    3 posts
    Member since:
    Jun 2016

    Posted 15 Jan 2018 in reply to Stefan Link to this post

    Thanks, works now !
Back to Top