Asp net validating datetime

i have tried culture and format both on my model as well as editor template side but still no effect. Lots of script to include, lots of extra work arounds etc.It takes up quite some time; so I hoped some MVC application would be out there to demonstrate how to handle this.I have lost a day trying to get what is a simple date picker to work.Whenever I use the kendo version I just get blocked by this validation problem.

Introduction This article describes a simple approach to validating dates received as strings (e.g., 2/21/2008).When using Chrome I noticed that my datetime validation in MVC was failing. I had a model with the following Data Annotations on it: All of the above looks ok and works exactly as expected on Firefox and Internet explorer but Chrome was still failing on validation and would not let me submit the form.This validation was working perfectly in Internet Explorer and Firefox. I searched around and noticed that this appears to be a known issue with Chrome and how it interprets globalization settings.All that is done is to split the date string up into month, day, and year, and then to attempt to create a date time value from those parts.If the operation succeeds, the method returns true, if it fails (with an invalid date) the failure is trapped in a catch block which in turn returns a false.

asp net validating datetime-29asp net validating datetime-79asp net validating datetime-39

It seems to be an issue with numeric (decimal) values only; dates are working fine.

Join our conversation (98 Comments).
Click Here To Leave Your Comment Asp net validating datetime.

Comments:

  1. 1
    Steve

    Ein kostenloser Cybersex-Chat gehört zu fast jeder erotischen Kontaktseite.

  2. 1
    Steve

    My first pair of name-brand shoes were Nike Forces. I never stuck to just one brand of shoes, because I was just happy to have some name-brand kicks on my feet.

  3. 1
    Steve

    Ach ja, den Tischtennisball im Mund hab ich vergessen. Und die beiden Dildos mit Fernbedienung, die an den richtigen Stellen, will sagen in den richtigen Löchern platziert sind.

  4. 1
    Steve

    "Unveiling Jerusalem" offers a historical journey, in search of Salomon's and Herod's Temples.

Leave a Reply

Your email address will not be published. Required fields are marked *