Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Globalize.addCultureInfo is not a function

I am using the Globalize jQuery plugin to have globalization (correct number and date formats) on the client side in my MVC website. So I have downloaded that plugin and included the following javascript files after the validation js files themselves (I have tried putting the Globalize file before as well without any luck):

<script src="/Scripts/globalize.js"></script>
<script src="/Scripts/jquery.validate.globalize.min.js"></script>
<script src="/Scripts/globalize/globalize.culture.da-DK.js"></script>

But when run the application, I get the error

Globalize.addCultureInfo is not a function

I cannot figure out what the reason is

like image 588
user2711444 Avatar asked Nov 10 '22 10:11

user2711444


1 Answers

According to the documentation of the Globalize library itself, this function has been removed in the 1.x version. This function was exist in the versions 0.x

This method is replaced by Globalize.loadMessages( json ). If you were using it for anything except message translations, you may also need to use Globalize.load.

like image 152
Hakan Fıstık Avatar answered Nov 15 '22 05:11

Hakan Fıstık