jquery-globalization

jQuery UI Slider and jQuery Globalization with value delimited by comma [ , ]

浪子不回头ぞ 提交于 2020-01-16 16:15:11
问题 I'm developing an ASP.NET MVC 3 app that uses both jQuery Globalization and jQuery UI Slider. I'm localizing this app to Portuguese from Brazil (pt-BR) and it also supports English. The problem is that when I change the language to Portuguese, all Model float values come delimited by a comma ( , ) like 7,7. I then try to set the Slider initial value but it only accepts the value with a dot ( . ) like 7.7. To overcome such situation I'm doing this: $.CreateSlider("#sliderHeight", "#Height",

jQuery UI Slider and jQuery Globalization with value delimited by comma [ , ]

喜欢而已 提交于 2020-01-16 16:15:10
问题 I'm developing an ASP.NET MVC 3 app that uses both jQuery Globalization and jQuery UI Slider. I'm localizing this app to Portuguese from Brazil (pt-BR) and it also supports English. The problem is that when I change the language to Portuguese, all Model float values come delimited by a comma ( , ) like 7,7. I then try to set the Slider initial value but it only accepts the value with a dot ( . ) like 7.7. To overcome such situation I'm doing this: $.CreateSlider("#sliderHeight", "#Height",

Localizing jquery validation with asp.net mvc 3

我只是一个虾纸丫 提交于 2019-12-14 03:39:32
问题 I am using Asp.Net Mvc3 and the unobtrusive jquery validation. I'd like to have my dates validation localized, I mean, jquery is validating my date as being MM/dd/yyyy but I would like it to be dd/MM/yyyy. I'm trying to use the jQuery Globalize plugin (http://github.com/jquery/globalize). I added references to the scripts globalize.js and globalize.culture.pt-BR.js and when my page loads I'm running the follwing script: (function() { $(function() { $.datepicker.setDefaults($.datepicker

Jquery Globalization

ぐ巨炮叔叔 提交于 2019-12-12 02:32:59
问题 I am using MVC4.0 and Jquery globalization plugin from Microsift "http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip" which i got from "http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx". This plugin i am using for amount formating e.g var result= $.format(1000, "c", "en-GB"); This plugin is working fine when i am giving reference to "glob.js" and "glob.all.js" files directly on page(View), but when i am giving reference to same files

ASP.NET MVC 3 RC 2 client side validation with globalization

时光总嘲笑我的痴心妄想 提交于 2019-12-03 07:28:14
问题 My goal is to validate a user input on the client-side, depending on the users' culture. I have a primitive data-model with the following structure: public class User { public int UserId { get; set; } [Required] [StringLength(20,MinimumLength=3)] public string Name { get; set; } [Required] public double Height { get; set; } } Furthermore, I want to have client-side validation enabled, checking if it is a valid number. Therefore, I've added the following lines in the <head> section of my

Globalize error with local numbers on .Net MVC Project

二次信任 提交于 2019-12-01 01:43:58
I am trying to validate local decimal numbers (Portuguese -> pt-PT) but I get a console error in the Browser: Uncaught TypeError: t.parseFloat is not a function. Exception occurred when checking element SizeOpenedWidth, check the 'number' method. In Portugal, the decimal separator is the ",", so a valid decimal number here is "10,21". The script I use to load Globalization: $.when( $.getJSON("/Scripts/cldr/supplemental/likelySubtags.json"), $.getJSON("/Scripts/cldr/main/numbers.json"), $.getJSON("/Scripts/cldr/main/ca-gregorian.json"), $.getJSON("/Scripts/cldr/supplemental/timeData.json") )

Unobtrusive Validation on en-GB Dates

天大地大妈咪最大 提交于 2019-11-30 21:16:08
I am designing a data input form using asp.net MVC4 which has an input of type date. Using the unobtrusive jQuery library in chrome and jQueryUI datepicker I was still getting an error (The field news_date must be a date.), after selecting a correct date format, using the datepicker (i.e. 14/02/2013) and submitting the form. Some searching suggested I should use the jQuery.globilization library. So after reading the documentation I added a reference to the following script. $(document).ready(function () { $.culture = Globalize.culture("en-GB"); $.validator.methods.date = function (value,

Globalize error with local numbers on .Net MVC Project

允我心安 提交于 2019-11-30 20:58:10
问题 I am trying to validate local decimal numbers (Portuguese -> pt-PT) but I get a console error in the Browser: Uncaught TypeError: t.parseFloat is not a function. Exception occurred when checking element SizeOpenedWidth, check the 'number' method. In Portugal, the decimal separator is the ",", so a valid decimal number here is "10,21". The script I use to load Globalization: $.when( $.getJSON("/Scripts/cldr/supplemental/likelySubtags.json"), $.getJSON("/Scripts/cldr/main/numbers.json"), $

Unobtrusive Validation on en-GB Dates

て烟熏妆下的殇ゞ 提交于 2019-11-30 05:17:15
问题 I am designing a data input form using asp.net MVC4 which has an input of type date. Using the unobtrusive jQuery library in chrome and jQueryUI datepicker I was still getting an error (The field news_date must be a date.), after selecting a correct date format, using the datepicker (i.e. 14/02/2013) and submitting the form. Some searching suggested I should use the jQuery.globilization library. So after reading the documentation I added a reference to the following script. $(document).ready

Localizing jquery validation with asp.net mvc 3

一世执手 提交于 2019-11-29 20:38:44
I am using Asp.Net Mvc3 and the unobtrusive jquery validation. I'd like to have my dates validation localized, I mean, jquery is validating my date as being MM/dd/yyyy but I would like it to be dd/MM/yyyy. I'm trying to use the jQuery Globalize plugin ( http://github.com/jquery/globalize ). I added references to the scripts globalize.js and globalize.culture.pt-BR.js and when my page loads I'm running the follwing script: (function() { $(function() { $.datepicker.setDefaults($.datepicker.regional['pt-BR']); Globalize.culture("pt-BR"); }); }).call(this); The jQuery UI plugin works as charm, but