Last active
July 9, 2016 01:09
-
-
Save pparadis/d8643555f5ba11bb824c60094745f4b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.when( | |
$.get( "cldr/main/en/ca-gregorian.json" ), | |
$.get( "cldr/main/fr/ca-gregorian.json" ), | |
$.get( "cldr/supplemental/likelySubtags.json" ), | |
$.get( "cldr/supplemental/timeData.json" ), | |
$.get( "cldr/supplemental/weekData.json" ) | |
).then(function() { | |
return [].slice.apply( arguments, [ 0 ] ).map(function( result ) { | |
return result[ 0 ]; | |
}); | |
}).then( Globalize.load ); | |
//Instantier jQuery.Globalize dans une culture | |
Globalize("en") //Cette culture peut être fournie par votre backend MVC, par exemple System.Threading.Thread.CurrentThread.CurrentCulture | |
//L'initialisation des règles peronnalisées pour jQuery.Validate se fait ici. | |
$.validator.methods.date = function (value, element) { | |
return this.optional(element) || Globalize.parseDate(value); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment