Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6564515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:58:35+00:00 2026-05-25T13:58:35+00:00

I am using Asp.Net Mvc3 and the unobtrusive jquery validation. I’d like to have

  • 0

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 the validation doesn’t.
What else am I missing?

Edit:

Using the links in the answer below I solved the problem using the Globalize plugin:

Of course, I had to add a reference to the Globalize plugin in the page and also a reference to the culture that I wanted to use (all available on the plugin’s site). After that is just a small piece of JavaScript code.

Globalize.culture("pt-BR");
$.validator.methods.date = function(value, element) {
    return this.optional(element) || Globalize.parseDate(value);
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:58:36+00:00Added an answer on May 25, 2026 at 1:58 pm

    If you are doing any work with internationalization and ASP.NET MVC I highly recommend reading through these two excellent posts by Nadeem Afana

    • ASP.NET MVC 3 Internationalization
    • ASP.NET MVC 3 Internationalization – Part 2 (NerdDinner Demo)

    In his second post he has a detailed example of using the jQuery UI datepicker and discusses the issues with localization.

    In his example he mentions the following

    @* Unfortunately, the datepicker only supports Neutral cultures, so we need to adjust date and time format to the specific culture *@
        $("#EventDate").change(function(){
          $(this).val(Globalize.format($(this).datetimepicker('getDate'), Globalize.culture().calendar.patterns.d + " " + Globalize.culture().calendar.patterns.t)); /*d t*/
        });
    

    i also recommend downloading the Nerd Dinner internationalization demo linked on his site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using asp.net mvc 3 with unobtrusive jquery validation. I have a form that
I am using unobtrusive validation in an ASP.Net MVC3 app. I would like to
I'm using jQuery Validate Unobtrusive with ASP.NET MVC3 Razor. I have a page with
We have a ASP.NET MVC 3 application that uses unobtrusive jQuery validation. The page
I need to enable the validation of hidden fields using ASP.net MVC3 unobtrusive validation.
I'm currently using ASP.NET MVC3 RC and I'm using the unobtrusive JQuery validations as
I'm using asp.net mvc 3 with jquery unobtrusive validation. I recently changed from standard
Using asp.net MVC3, I have a partial view which requires remote validation. As I
i am using asp.net-mvc3 helpers and the jquery validation plugin (what comes out of
I have created a web application using ASP.NET MVC3 in Visual studio (no SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.